Dockerfile 926 B

12345678910111213141516171819202122232425262728293031
  1. FROM nvcr.io/nvidia/cuda:11.0.3-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. && apt-get clean autoclean && rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*
  13. RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O install_miniconda.sh && \
  14. bash install_miniconda.sh -b -p /opt/conda && rm install_miniconda.sh
  15. ENV PATH="/opt/conda/bin:${PATH}"
  16. RUN conda install python~=3.10.12 pip && \
  17. pip install --no-cache-dir "torch>=1.12" && \
  18. conda clean --all && rm -rf ~/.cache/pip
  19. VOLUME /cache
  20. ENV PETALS_CACHE=/cache
  21. COPY . petals/
  22. RUN pip install --no-cache-dir -e petals
  23. WORKDIR /home/petals/
  24. CMD bash