Untitled diff

Created Diff never expires
8 removals
35 lines
12 additions
39 lines
FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu16.04
FROM ubuntu:18.04
ARG PYTHON_VERSION=3.6
ARG PYTHON_VERSION=3.6
RUN apt-get update && apt-get install -y --no-install-recommends \
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
build-essential \
cmake \
cmake \
git \
git \
curl \
curl \
ca-certificates \
ca-certificates \
libjpeg-dev \
libjpeg-dev \
libpng-dev && \
libpng-dev && \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/*




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 -y python=$PYTHON_VERSION numpy pyyaml scipy ipython mkl mkl-include ninja cython typing && \
/opt/conda/bin/conda install -y python=$PYTHON_VERSION numpy pyyaml scipy ipython mkl mkl-include ninja cython typing && \
/opt/conda/bin/conda install -y -c pytorch magma-cuda100 && \
/opt/conda/bin/conda clean -ya
/opt/conda/bin/conda clean -ya
ENV PATH /opt/conda/bin:$PATH
ENV PATH /opt/conda/bin:$PATH
# 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/
RUN git clone --branch v1.2.0 https://github.com/pytorch/pytorch.git && cd pytorch
WORKDIR /opt/pytorch
WORKDIR /opt/pytorch
COPY . .


RUN git submodule update --init --recursive
RUN git submodule update --init --recursive
RUN TORCH_CUDA_ARCH_LIST="3.5 5.2 6.0 6.1 7.0+PTX" TORCH_NVCC_FLAGS="-Xfatbin -compress-all" \
RUN CMAKE_PREFIX_PATH="$(dirname $(which conda))/../" \
CMAKE_PREFIX_PATH="$(dirname $(which conda))/../" \
USE_CUDA=OFF \
USE_DISTRIBUTED=OFF \
USE_QNNPACK=OFF \
BUILD_TEST=OFF \
USE_FBGEMM=OFF \
USE_NNPACK=OFF \
BUILD_CAFFE2_OPS=OFF \
USE_NCCL=OFF \
pip install -v .
pip install -v .


RUN git clone https://github.com/pytorch/vision.git && cd vision && pip install -v .

WORKDIR /workspace
WORKDIR /workspace
RUN chmod -R a+w .
RUN chmod -R a+w .