diff --git a/Dockerfile b/Dockerfile index 3706aa38b461..2b1792d8ab6f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,6 +27,7 @@ RUN mkdir /opt/ccache && ccache --set-config=cache_dir=/opt/ccache ENV PATH /opt/conda/bin:$PATH FROM dev-base as conda +ARG PYTHON_VERSION=3.8 RUN curl -fsSL -v -o ~/miniconda.sh -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ chmod +x ~/miniconda.sh && \ ~/miniconda.sh -b -p /opt/conda && \ @@ -49,8 +50,9 @@ RUN --mount=type=cache,target=/opt/ccache \ python setup.py install FROM conda as conda-installs +ARG PYTHON_VERSION=3.8 ARG INSTALL_CHANNEL=pytorch-nightly -RUN /opt/conda/bin/conda install -c "${INSTALL_CHANNEL}" -y pytorch torchvision cudatoolkit=11.0.221 && \ +RUN /opt/conda/bin/conda install -c "${INSTALL_CHANNEL}" -y python=${PYTHON_VERSION} pytorch torchvision cudatoolkit=11.0.221 && \ /opt/conda/bin/conda clean -ya RUN /opt/conda/bin/pip install torchelastic