-
Notifications
You must be signed in to change notification settings - Fork 12
/
Singularity.digits
157 lines (145 loc) · 4.2 KB
/
Singularity.digits
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
Bootstrap: docker
From: nvidia/cuda:8.0-cudnn5-devel-ubuntu16.04
%post
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen
apt-get update
apt-get install -y software-properties-common python-software-properties
add-apt-repository main
add-apt-repository universe
add-apt-repository multiverse
apt-get install -y --no-install-recommends \
autoconf \
automake \
ca-certificates \
curl \
g++ \
git \
libtool \
make \
python-dev \
python-setuptools \
unzip doxygen
mkdir /protobuf
export PROTOBUF_ROOT=/protobuf
cd /protobuf
git clone -b '3.2.x' https://github.com/google/protobuf.git .
./autogen.sh
./configure --prefix=/usr/local/protobuf
make "-j$(nproc)"
make install
cd python
python setup.py install --cpp_implementation
apt-get update
apt-get install -y --no-install-recommends \
ca-certificates \
cmake \
curl \
g++ \
git \
libatlas-base-dev \
libboost-filesystem-dev \
libboost-python-dev \
libboost-system-dev \
libboost-thread-dev \
libgflags-dev \
libgoogle-glog-dev \
libhdf5-serial-dev \
libleveldb-dev \
liblmdb-dev \
libnccl-dev=1.2.3-1+cuda8.0 \
libopencv-dev \
libsnappy-dev \
python-all-dev \
python-h5py \
python-matplotlib \
python-opencv \
python-pil \
python-pydot \
python-scipy \
python-skimage \
python-sklearn
# Build pip
curl -O https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install --upgrade --no-cache-dir pip
apt-get -y install libprotobuf-dev protobuf-compiler
# Build caffe
mkdir /caffe
export CAFFE_ROOT=/caffe
git clone https://github.com/nvidia/caffe.git /caffe -b 'caffe-0.15'
cd /caffe
pip install ipython==5.4.1
pip install -r python/requirements.txt
# cat python/requirements.txt | xargs -n1 pip install
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local/caffe -DUSE_NCCL=ON \
-DUSE_CUDNN=ON -DCUDA_ARCH_NAME=Manual -DCUDA_ARCH_BIN="35 52 60 61" \
-DCUDA_ARCH_PTX="61" ..
make -j"$(nproc)"
make install
make pycaffe
cd /
# Install the packages to get pip installed or else we run into numpy problems
apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
python
# Build pip, need to do this before DIGITS packages or else we get numpy problems
curl -O https://bootstrap.pypa.io/get-pip.py
python get-pip.py
pip install --upgrade --no-cache-dir pip
apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
graphviz \
gunicorn \
libatlas3-base \
libboost-filesystem1.58.0 \
bboost-python1.58.0 \
libboost-system1.58.0 \
libboost-thread1.58.0 \
libfreetype6-dev \
libgoogle-glog0v5 \
libhdf5-serial-dev \
libleveldb1v5 \
libnccl1=1.2.3-1+cuda8.0 \
libopencv-core2.4v5 \
libopencv-highgui2.4v5 \
libopencv-imgproc2.4v5 \
libpng12-dev \
libzmq5 \
nginx \
pkg-config \
python-dev \
python-flask \
python-flaskext.socketio \
python-flaskext.wtf \
python-gevent \
python-lmdb \
python-opencv \
python-pil \
python-pydot \
python-requests \
python-six \
python-skimage \
python-tk \
python-wtforms \
rsync \
software-properties-common
rm -rf /var/lib/apt/lists/*
pip install https://github.com/NVIDIA/DIGITS/archive/v6.0.1.tar.gz
pip install --no-cache-dir \
setuptools\>=18.5 \
tensorflow-gpu==1.2.1 \
protobuf==3.2.0
mkdir /gpfs /gs2 /gs3 /gs4 /gs5 /gs6 /gs7 /gs8 /gs9 /gs10 /gs11 /gs12 /spin1 /data /scratch /fdb /lscratch
apt-get clean
%environment
export DIGITS_JOBS_DIR=/mnt
export DIGITS_LOGFILE_FILENAME=/mnt/digits.log
export PYTHONPATH=/usr/local/python
export DIGITS_VERSION=6.0
export PATH=/usr/local/caffe/bin/:$PATH
export PYTHONPATH=/usr/local/caffe/python/:$PYTHONPATH
export LD_LIBRARY_PATH=/usr/local/protobuf/lib:$LD_LIBRARY_PATH