install pytorch into default conda env (#5482)

This commit is contained in:
ngimel
2018-02-28 18:42:38 -08:00
committed by Soumith Chintala
parent 39608b0180
commit 771791fe2f

View File

@ -12,16 +12,14 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
ENV PYTHON_VERSION=3.6
RUN curl -o ~/miniconda.sh -O https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \ RUN curl -o ~/miniconda.sh -O https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh && \
chmod +x ~/miniconda.sh && \ chmod +x ~/miniconda.sh && \
~/miniconda.sh -b -p /opt/conda && \ ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \ rm ~/miniconda.sh && \
# /opt/conda/bin/conda install conda-build && \ /opt/conda/bin/conda install numpy pyyaml scipy ipython mkl && \
/opt/conda/bin/conda create -y --name pytorch-py$PYTHON_VERSION python=$PYTHON_VERSION numpy pyyaml scipy ipython mkl&& \ /opt/conda/bin/conda install -c soumith magma-cuda90 && \
/opt/conda/bin/conda clean -ya /opt/conda/bin/conda clean -ya
ENV PATH /opt/conda/envs/pytorch-py$PYTHON_VERSION/bin:$PATH ENV PATH /opt/conda/bin:$PATH
RUN conda install --name pytorch-py$PYTHON_VERSION -c soumith magma-cuda90
# This must be done before pip so that requirements.txt is available # This must be done before pip so that requirements.txt is available
WORKDIR /opt/pytorch WORKDIR /opt/pytorch
COPY . . COPY . .