mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
docker: Fix PYTHON_VERSION not propagating (#47877)
Summary: Signed-off-by: Eli Uriegas <eliuriegas@fb.com> Fixes #{issue number} Pull Request resolved: https://github.com/pytorch/pytorch/pull/47877 Reviewed By: samestep Differential Revision: D24929116 Pulled By: seemethere fbshipit-source-id: 442f8eb13318c44735200dfbb2f88e4ca1d9a127
This commit is contained in:
committed by
Facebook GitHub Bot
parent
315122ce15
commit
0d6c900bdb
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user