Skip to content

Commit a7f4a6f

Browse files
committed
mlperf 0.6 maskrcnn using pytorch 1.0 & CUDA9
1 parent a8a66e3 commit a7f4a6f

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
ARG CUDA="9.0"
2+
ARG CUDNN="7"
3+
4+
FROM nvidia/cuda:${CUDA}-cudnn${CUDNN}-devel-ubuntu16.04
5+
6+
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
7+
8+
# install basics
9+
RUN apt-get update -y \
10+
&& apt-get install -y apt-utils git curl ca-certificates bzip2 cmake tree htop bmon iotop g++ \
11+
&& apt-get install -y libglib2.0-0 libsm6 libxext6 libxrender-dev
12+
13+
# Install Miniconda
14+
RUN curl -so /miniconda.sh https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh \
15+
&& chmod +x /miniconda.sh \
16+
&& /miniconda.sh -b -p /miniconda \
17+
&& rm /miniconda.sh
18+
19+
ENV PATH=/miniconda/bin:$PATH
20+
21+
# Create a Python 3.6 environment
22+
RUN /miniconda/bin/conda install -y conda-build \
23+
&& /miniconda/bin/conda create -y --name py36 python=3.6.7 \
24+
&& /miniconda/bin/conda clean -ya
25+
26+
ENV CONDA_DEFAULT_ENV=py36
27+
ENV CONDA_PREFIX=/miniconda/envs/$CONDA_DEFAULT_ENV
28+
ENV PATH=$CONDA_PREFIX/bin:$PATH
29+
ENV CONDA_AUTO_UPDATE_CONDA=false
30+
31+
RUN conda install -y ipython
32+
RUN pip install ninja yacs cython matplotlib opencv-python
33+
34+
# Install PyTorch 1.0 Nightly and OpenCV
35+
RUN conda install -y pytorch-nightly -c pytorch \
36+
&& conda clean -ya
37+
38+
# Install TorchVision master
39+
RUN git clone https://github.com/pytorch/vision.git \
40+
&& cd vision \
41+
&& python setup.py install
42+
43+
# install pycocotools
44+
RUN git clone https://github.com/cocodataset/cocoapi.git \
45+
&& cd cocoapi/PythonAPI \
46+
&& python setup.py build_ext install
47+
48+
# install apex
49+
RUN git clone https://github.com/NVIDIA/apex.git \
50+
&& cd apex \
51+
&& python setup.py install --cuda_ext --cpp_ext
52+
53+
# install PyTorch Detection
54+
RUN git clone https://github.com/facebookresearch/maskrcnn-benchmark.git \
55+
&& cd maskrcnn-benchmark \
56+
&& python setup.py build develop
57+
58+
WORKDIR /maskrcnn-benchmark

0 commit comments

Comments
 (0)