@@ -2,29 +2,38 @@ FROM nvcr.io/nvidia/tensorflow:20.11-tf2-py3
2
2
# NVIDIA DIGITS runs on Python 3.6
3
3
4
4
RUN apt-get update && \
5
- apt-get install -y libsm6 libxext6 libxrender-dev mercurial libgdal-dev python3-gdal \
6
- libsdl-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev \
7
- libsmpeg-dev libportmidi-dev libavformat-dev libswscale-dev
5
+ apt-get install -y --no-install-recommends \
6
+ fonts-nanum \
7
+ fonts-nanum-coding \
8
+ fonts-nanum-extra \
9
+ htop \
10
+ ncurses-term \
11
+ libasound2-dev \
12
+ libsm6 libxext6 libxrender-dev mercurial libgdal-dev python3-gdal \
13
+ libsdl-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev \
14
+ libsmpeg-dev libportmidi-dev libavformat-dev libswscale-dev
8
15
9
- ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
10
- ENV C_INCLUDE_PATH=/usr/include/gdal
11
16
ENV DEBIAN_FRONTEND=noninteractive \
12
17
MPLBACKEND=Svg \
18
+ PIP_IGNORE_INSTALLED=0 \
13
19
PYTHONUNBUFFERED=1 \
20
+ CPLUS_INCLUDE_PATH=/usr/include/gdal \
21
+ C_INCLUDE_PATH=/usr/include/gdal \
14
22
LD_LIBRARY_PATH="/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/local/nvidia/lib64:/usr/include/x86_64-linux-gnu" \
15
23
PATH="/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/bin/cmake/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/src/lightgbm/LightGBM:/usr/local/bin/mecab" \
16
24
mecab_dicdir=/usr/local/lib/mecab/dic/mecab-ko-dic \
25
+ NODE_OPTIONS="--max-old-space-size=4096" \
17
26
LANG=C.UTF-8
18
27
19
28
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 2
20
29
21
30
# install NLP packages *mecab-ko & khai*
22
31
RUN apt-get update && \
23
32
apt-get install -y \
33
+ automake \
34
+ gfortran \
35
+ libasound2-dev \
24
36
openjdk-8-jdk \
25
- libasound2-dev \
26
- gfortran \
27
- automake \
28
37
&& \
29
38
cd /tmp && \
30
39
curl -LO https://bitbucket.org/eunjeon/mecab-ko/downloads/mecab-0.996-ko-0.9.2.tar.gz && \
@@ -53,34 +62,31 @@ RUN echo "Install mecab-ko-dic" && \
53
62
# OpenCV
54
63
RUN ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h && \
55
64
apt-get install -y \
56
- libgstreamer1.0-dev \
57
- libgstreamer-plugins-base1.0-dev \
58
- libgtk-3-dev \
65
+ libgstreamer1.0-dev \
66
+ libgstreamer-plugins-base1.0-dev \
67
+ libgtk-3-dev \
59
68
libtbb-dev \
60
- libatlas-base-dev \
61
- libdc1394-22-dev \
62
- libxvidcore-dev \
63
- libfaac-dev \
64
- libmp3lame-dev \
65
- libtheora-dev \
66
- libvorbis-dev \
67
- libxvidcore-dev \
68
- libopencore-amrnb-dev libopencore-amrwb-dev \
69
- libavresample-dev \
70
- x264 \
71
- libx264-dev \
72
- v4l-utils \
73
- libprotobuf-dev protobuf-compiler \
74
- libgoogle-glog-dev libgflags-dev \
75
- libgphoto2-dev \
76
- libeigen3-dev \
77
- libhdf5-dev \
78
- && \
79
- apt-get clean && \
80
- rm -rf /var/lib/apt/lists/
69
+ libatlas-base-dev \
70
+ libdc1394-22-dev \
71
+ libxvidcore-dev \
72
+ libfaac-dev \
73
+ libmp3lame-dev \
74
+ libtheora-dev \
75
+ libvorbis-dev \
76
+ libxvidcore-dev \
77
+ libopencore-amrnb-dev libopencore-amrwb-dev \
78
+ libavresample-dev \
79
+ x264 \
80
+ libx264-dev \
81
+ v4l-utils \
82
+ libprotobuf-dev protobuf-compiler \
83
+ libgoogle-glog-dev libgflags-dev \
84
+ libgphoto2-dev \
85
+ libeigen3-dev \
86
+ libhdf5-dev
81
87
82
88
WORKDIR /tmp
83
- ENV OPENCV_VERSION="4.5.1 "
89
+ ENV OPENCV_VERSION="4.5.2 "
84
90
RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
85
91
wget -O opencv-contrib.zip https://github.com/opencv/opencv_contrib/archive/${OPENCV_VERSION}.zip && \
86
92
unzip ${OPENCV_VERSION}.zip && \
@@ -105,7 +111,7 @@ RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
105
111
-D WITH_V4L=ON \
106
112
-D BUILD_TESTS=OFF \
107
113
-D BUILD_PERF_TESTS=OFF \
108
- -D OPENCV_EXTRA_MODULES_PATH="../../opencv_contrib-4.5.1 /modules" \
114
+ -D OPENCV_EXTRA_MODULES_PATH="../../opencv_contrib-4.5.2 /modules" \
109
115
-D CMAKE_BUILD_TYPE=RELEASE \
110
116
-D CMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)" ) \
111
117
-D PYTHON_EXECUTABLE=$(which python3) \
@@ -119,7 +125,7 @@ RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
119
125
rm -fr opencv*
120
126
121
127
122
- RUN curl -sL https://deb.nodesource.com/setup_10 .x | bash - && \
128
+ RUN curl -sL https://deb.nodesource.com/setup_14 .x | bash - && \
123
129
apt-get update -y && \
124
130
apt-get install -y nodejs
125
131
@@ -145,6 +151,25 @@ RUN mkdir -p /opt/oracle && \
145
151
echo /opt/oracle/instantclient* > /etc/ld.so.conf.d/oracle-instantclient.conf && \
146
152
ldconfig
147
153
154
+
155
+ # install bashtop
156
+ WORKDIR /tmp
157
+ RUN git clone https://github.com/aristocratos/bashtop.git && \
158
+ cd bashtop && \
159
+ make install
160
+
161
+ # install git-lfs
162
+ WORKDIR /tmp
163
+ RUN curl -sLO https://github.com/git-lfs/git-lfs/releases/download/v2.12.1/git-lfs-linux-amd64-v2.12.1.tar.gz && \
164
+ tar -zxf git-lfs-linux-amd64-v2.12.1.tar.gz && \
165
+ bash install.sh && \
166
+ rm -rf /tmp/*
167
+
168
+ # install code-server
169
+ RUN curl -fL https://github.com/cdr/code-server/releases/download/v3.9.0/code-server-3.9.0-linux-amd64.tar.gz | tar -C /usr/local/lib -xz && \
170
+ mv /usr/local/lib/code-server-3.9.0-linux-amd64 /usr/local/lib/code-server-3.9.0 && \
171
+ ln -s /usr/local/lib/code-server-3.9.0/bin/code-server /usr/local/bin/code-server
172
+
148
173
WORKDIR /tmp
149
174
RUN python3 -m pip install --no-cache-dir \
150
175
Cython==0.29.21 \
@@ -163,18 +188,6 @@ RUN cd /tmp && \
163
188
pip uninstall -y typing && \
164
189
python3 -m pip install .
165
190
166
-
167
- # install git-lfs
168
- WORKDIR /tmp
169
- RUN curl -sLO https://github.com/git-lfs/git-lfs/releases/download/v2.12.1/git-lfs-linux-amd64-v2.12.1.tar.gz && \
170
- tar -zxf git-lfs-linux-amd64-v2.12.1.tar.gz && \
171
- bash install.sh && \
172
- rm -rf /tmp/*
173
-
174
- COPY ./service-defs /etc/backend.ai/service-defs
175
- RUN curl -fL https://github.com/cdr/code-server/releases/download/v3.7.3/code-server-3.7.3-linux-amd64.tar.gz | tar -C /usr/local/lib -xz && \
176
- mv /usr/local/lib/code-server-3.7.3-linux-amd64 /usr/local/lib/code-server-3.7.3 && \
177
- ln -s /usr/local/lib/code-server-3.7.3/bin/code-server /usr/local/bin/code-server
178
191
# Install Open MPI
179
192
RUN mkdir /tmp/openmpi && \
180
193
cd /tmp/openmpi && \
@@ -192,28 +205,35 @@ RUN mv /usr/local/bin/mpirun /usr/local/bin/mpirun.real && \
192
205
echo 'mpirun.real --allow-run-as-root "$@"' >> /usr/local/bin/mpirun && \
193
206
chmod a+x /usr/local/bin/mpirun
194
207
208
+ RUN python3 -m pip install --no-cache-dir \
209
+ mpi4py==3.0.3 \
210
+ nni==2.0 \
211
+ mlflow==1.14.1 \
212
+ scikit-nni==0.2.1
213
+
195
214
# Configure OpenMPI to run good defaults:
196
215
RUN echo "btl_tcp_if_exclude = lo,docker0" >> /usr/local/etc/openmpi-mca-params.conf
197
216
198
- ENV NODE_OPTIONS="--max-old-space-size=4096"
199
-
200
217
RUN jupyter nbextensions_configurator enable && \
201
218
jupyter contrib nbextension install && \
202
219
jupyter nbextension enable --py --sys-prefix widgetsnbextension && \
203
- jupyter serverextension enable --py jupyterlab --sys-prefix && \
204
- jupyter labextension install --no-build @jupyter-widgets/jupyterlab-manager && \
205
- jupyter labextension install --no-build @krassowski/jupyterlab-lsp && \
206
- jupyter serverextension enable --py jupyter_lsp && \
207
- jupyter labextension install --no-build @jupyterlab/toc && \
208
220
jupyter nbextension enable execute_time/ExecuteTime && \
209
221
jupyter nbextension enable toc2/main && \
210
- jupyter labextension install @pyviz/jupyterlab_pyviz && \
211
- jupyter labextension install @bokeh/jupyter_bokeh && \
212
- jupyter labextension install --no-build jupyterlab-nvdashboard && \
222
+ jupyter serverextension enable --py jupyterlab --sys-prefix && \
223
+ jupyter serverextension enable --py jupyter_lsp && \
224
+ jupyter labextension install @jupyter-widgets/jupyterlab-manager --no-build && \
225
+ jupyter labextension install
[email protected] --no-build && \
226
+ jupyter labextension install @jupyterlab/toc --no-build && \
227
+ jupyter labextension install @kiteco/jupyterlab-kite --no-build && \
228
+ jupyter labextension install jupyterlab-flake8 --no-build && \
229
+ jupyter labextension install @pyviz/jupyterlab_pyviz --no-build && \
230
+ jupyter labextension install @bokeh/jupyter_bokeh --no-build && \
231
+ jupyter labextension install jupyterlab-nvdashboard --no-build && \
213
232
jupyter lab build
214
233
215
234
RUN apt autoclean && \
216
235
sed -i 's/source \/ usr\/ local\/ nvm\/ nvm.sh//' /etc/bash.bashrc && \
236
+ ln -sf /usr/share/terminfo/x/xterm-color /usr/share/terminfo/x/xterm-256color && \
217
237
rm -rf /var/lib/apt/lists/* && \
218
238
rm -rf /root/.cache && \
219
239
rm -rf /tmp/*
@@ -223,6 +243,8 @@ RUN /usr/bin/python3 -m ipykernel install --display-name "Python 3.6 (NGC 20.11
223
243
cat /usr/local/share/jupyter/kernels/python3/kernel.json
224
244
225
245
# Backend.AI specifics
246
+ COPY ./service-defs /etc/backend.ai/service-defs
247
+ COPY runner-scripts/bootstrap.sh runner-scripts/setup_multinode.py /opt/container/
226
248
LABEL ai.backend.kernelspec="1" \
227
249
ai.backend.envs.corecount="OPENBLAS_NUM_THREADS,OMP_NUM_THREADS,NPROC" \
228
250
ai.backend.features="batch query uid-match user-input" \
@@ -235,7 +257,7 @@ LABEL ai.backend.kernelspec="1" \
235
257
ai.backend.base-distro="ubuntu16.04" \
236
258
ai.backend.runtime-type="python" \
237
259
ai.backend.runtime-path="/usr/bin/python" \
238
- ai.backend.service-ports="ipython:pty:3000,jupyter:http:8080 ,jupyterlab:http:8090,vscode:http:8180,tensorboard:http:6006"
260
+ ai.backend.service-ports="ipython:pty:3000,jupyter:http:8091 ,jupyterlab:http:8090,vscode:http:8180,tensorboard:http:6006,mlflow-ui:preopen:5000,nniboard:preopen:8080 "
239
261
240
262
WORKDIR /home/work
241
263
# vim: ft=dockerfile
0 commit comments