-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.caffe2.gpu
56 lines (56 loc) · 1.33 KB
/
Dockerfile.caffe2.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
56
FROM nvidia/cuda:9.1-cudnn7-runtime-ubuntu16.04
MAINTAINER Jermine.hu@qq.com
# caffe2 install with gpu support
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
git \
libgflags-dev \
libgoogle-glog-dev \
libgtest-dev \
libiomp-dev \
libleveldb-dev \
liblmdb-dev \
libopencv-dev \
libopenmpi-dev \
libprotobuf-dev \
libsnappy-dev \
openmpi-bin \
protobuf-compiler \
python-dev \
python-pip ;\
pip install --upgrade pip==9.0.3 ;\
pip --no-cache-dir install setuptools ;\
python -V && pip -V ;\
pip install --no-cache-dir \
flask \
future \
graphviz \
hypothesis \
matplotlib \
numpy \
protobuf \
pydot \
python-nvd3 \
pyyaml \
requests \
scikit-image \
scipy \
six \
tornado ;\
git clone --branch master --recursive https://github.com/caffe2/caffe2.git ;\
cd caffe2 && mkdir build && cd build \
&& cmake .. \
-DCUDA_ARCH_NAME=Manual \
-DCUDA_ARCH_BIN="35 52 60 61" \
-DCUDA_ARCH_PTX="61" \
-DUSE_NNPACK=OFF \
-DUSE_ROCKSDB=OFF \
&& make -j"$(nproc)" install \
&& ldconfig \
&& make clean \
&& cd .. \
&& rm -rf build ;\
apt-get autoremove && apt-get autoclean ;\
rm -rf /var/lib/apt/lists/*
ENV PYTHONPATH /usr/local