forked from mlcommons/inference
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.gpu
executable file
·55 lines (44 loc) · 1.58 KB
/
Dockerfile.gpu
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu16.04
ENV PYTHON_VERSION=3.7
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV PATH /opt/anaconda3/bin:$PATH
WORKDIR /root
ENV HOME /root
RUN apt-get update
RUN apt-get install -y --no-install-recommends \
git \
build-essential \
software-properties-common \
ca-certificates \
wget \
curl \
htop \
zip \
unzip
RUN cd /opt && \
wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-4.6.14-Linux-x86_64.sh -O miniconda.sh && \
/bin/bash ./miniconda.sh -b -p /opt/anaconda3 && \
rm miniconda.sh && \
/opt/anaconda3/bin/conda clean -tipsy && \
ln -s /opt/anaconda3/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". /opt/anaconda3/etc/profile.d/conda.sh" >> ~/.bashrc && \
echo "conda activate base" >> ~/.bashrc && \
conda config --set always_yes yes --set changeps1 no
RUN pip install --upgrade pip && \
pip install cython future pillow onnx opencv-python-headless && \
ln -s /usr/local/cuda/lib64 /usr/local/cuda/lib && \
cp /usr/lib/x86_64-linux-gnu/libnccl* /usr/local/cuda/lib && \
ldconfig
RUN conda install pytorch torchvision -c pytorch
RUN pip install tensorflow-gpu==1.14 onnxruntime-gpu
RUN pip install Cython && pip install pycocotools
RUN cd /tmp && \
git clone https://github.com/mlperf/inference && \
cd inference/loadgen && \
pip install pybind11 && \
CFLAGS="-std=c++14" python setup.py install && \
rm -rf mlperf
RUN echo "/usr/local/cuda/compat" >> /etc/ld.so.conf.d/cuda-10-0.conf && \
ldconfig
ENTRYPOINT ["/bin/bash"]