Dockerfile 904 B

1234567891011121314151617181920212223242526272829
  1. FROM nvcr.io/nvidia/cuda:11.6.2-cudnn8-devel-ubuntu20.04
  2. LABEL maintainer="bigscience-workshop"
  3. LABEL repository="petals"
  4. WORKDIR /home
  5. # Set en_US.UTF-8 locale by default
  6. RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment
  7. # Install packages
  8. RUN apt-get update && apt-get install -y --no-install-recommends \
  9. build-essential \
  10. wget \
  11. git \
  12. ed \
  13. && apt-get clean autoclean && rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*
  14. RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O install_miniconda.sh && \
  15. bash install_miniconda.sh -b -p /opt/conda && rm install_miniconda.sh
  16. ENV PATH="/opt/conda/bin:${PATH}"
  17. RUN conda install python~=3.10 pip && \
  18. pip install --no-cache-dir "torch>=1.12" torchvision torchaudio && \
  19. conda clean --all && rm -rf ~/.cache/pip
  20. COPY . petals/
  21. RUN pip install -e petals[dev]
  22. WORKDIR /home/petals/
  23. CMD bash