mirror of
https://github.com/bigscience-workshop/petals
synced 2024-10-31 09:20:41 +00:00
90fbaab61e
We want to use `3.10.x` since `grpcio-tools` is not compatible with 3.11 yet. However, `python~=3.10` meant `python>=3.10, python<4.0`, so we ended up with a broken build due to python 3.11 installed.
32 lines
926 B
Docker
32 lines
926 B
Docker
FROM nvcr.io/nvidia/cuda:11.0.3-cudnn8-devel-ubuntu20.04
|
|
LABEL maintainer="bigscience-workshop"
|
|
LABEL repository="petals"
|
|
|
|
WORKDIR /home
|
|
# Set en_US.UTF-8 locale by default
|
|
RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment
|
|
|
|
# Install packages
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
build-essential \
|
|
wget \
|
|
git \
|
|
&& apt-get clean autoclean && rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*
|
|
|
|
RUN wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O install_miniconda.sh && \
|
|
bash install_miniconda.sh -b -p /opt/conda && rm install_miniconda.sh
|
|
ENV PATH="/opt/conda/bin:${PATH}"
|
|
|
|
RUN conda install python~=3.10.12 pip && \
|
|
pip install --no-cache-dir "torch>=1.12" && \
|
|
conda clean --all && rm -rf ~/.cache/pip
|
|
|
|
VOLUME /cache
|
|
ENV PETALS_CACHE=/cache
|
|
|
|
COPY . petals/
|
|
RUN pip install --no-cache-dir -e petals
|
|
|
|
WORKDIR /home/petals/
|
|
CMD bash
|