@@ -2,15 +2,24 @@ FROM nvcr.io/nvidia/tensorflow:21.03-tf1-py3
2
2
# NVIDIA DIGITS runs on Python 3.8
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 \
13
18
PYTHONUNBUFFERED=1 \
19
+ PIP_IGNORE_INSTALLED=0 \
20
+ CPLUS_INCLUDE_PATH=/usr/include/gdal \
21
+ C_INCLUDE_PATH=/usr/include/gdal \
22
+ TF_ENABLE_DEPRECATION_WARNINGS=1 \
14
23
LD_LIBRARY_PATH="/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/local/nvidia/lib64:/usr/include/x86_64-linux-gnu" \
15
24
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
25
mecab_dicdir=/usr/local/lib/mecab/dic/mecab-ko-dic \
@@ -21,10 +30,9 @@ RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 2
21
30
# install NLP packages *mecab-ko & khai*
22
31
RUN apt-get update && \
23
32
apt-get install -y \
24
- openjdk-8-jdk \
25
- libasound2-dev \
26
- gfortran \
27
33
automake \
34
+ gfortran \
35
+ openjdk-8-jdk \
28
36
&& \
29
37
cd /tmp && \
30
38
curl -LO https://bitbucket.org/eunjeon/mecab-ko/downloads/mecab-0.996-ko-0.9.2.tar.gz && \
@@ -74,10 +82,7 @@ RUN ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h && \
74
82
libgoogle-glog-dev libgflags-dev \
75
83
libgphoto2-dev \
76
84
libeigen3-dev \
77
- libhdf5-dev \
78
- && \
79
- apt-get clean && \
80
- rm -rf /var/lib/apt/lists/
85
+ libhdf5-dev
81
86
82
87
WORKDIR /tmp
83
88
ENV OPENCV_VERSION="4.5.2"
@@ -148,19 +153,9 @@ RUN mkdir -p /opt/oracle && \
148
153
WORKDIR /tmp
149
154
RUN python3 -m pip install --no-cache-dir \
150
155
argon2_cffi==20.1.0
151
- COPY ./requirements.txt /tmp
152
- RUN python3 -m pip install --no-cache-dir -r requirements.txt && \
153
- rm -f /tmp/*.whl /tmp/requirements.txt
154
- ENV SCIPY_VERSION 1.6.0
155
- # Install scipy
156
- RUN cd /tmp && \
157
- git clone --branch=v${SCIPY_VERSION} --depth=1 https://github.com/scipy/scipy.git scipy && \
158
- cd scipy && \
159
- git checkout -b v${SCIPY_VERSION} && \
160
- cp site.cfg.example site.cfg && \
161
- pip uninstall -y typing && \
162
- python3 -m pip install .
163
-
156
+ COPY ./requirements.py36.txt /tmp
157
+ RUN python3 -m pip install --no-cache-dir -r requirements.py36.txt && \
158
+ rm -f /tmp/*.whl /tmp/requirements.py36.txt
164
159
165
160
# install git-lfs
166
161
WORKDIR /tmp
@@ -169,7 +164,11 @@ RUN curl -sLO https://github.com/git-lfs/git-lfs/releases/download/v2.12.1/git-l
169
164
bash install.sh && \
170
165
rm -rf /tmp/*
171
166
172
- COPY ./service-defs /etc/backend.ai/service-defs
167
+ WORKDIR /tmp
168
+ RUN git clone https://github.com/aristocratos/bashtop.git && \
169
+ cd bashtop && \
170
+ make install
171
+
173
172
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 && \
174
173
mv /usr/local/lib/code-server-3.7.3-linux-amd64 /usr/local/lib/code-server-3.7.3 && \
175
174
ln -s /usr/local/lib/code-server-3.7.3/bin/code-server /usr/local/bin/code-server
@@ -210,10 +209,15 @@ RUN jupyter nbextensions_configurator enable && \
210
209
211
210
RUN apt autoclean && \
212
211
sed -i 's/source \/ usr\/ local\/ nvm\/ nvm.sh//' /etc/bash.bashrc && \
212
+ ln -sf /usr/share/terminfo/x/xterm-color /usr/share/terminfo/x/xterm-256color && \
213
213
rm -rf /var/lib/apt/lists/* && \
214
214
rm -rf /root/.cache && \
215
215
rm -rf /tmp/*
216
216
217
+ # Copy Backend.Ai multi-node support
218
+ COPY ./service-defs-tf1 /etc/backend.ai/service-defs
219
+ COPY runner-scripts/bootstrap.sh runner-scripts/setup_multinode.py /opt/container/
220
+
217
221
# Install ipython kernelspec
218
222
RUN /usr/bin/python3 -m ipykernel install --display-name "Python 3.8 (NGC 21.03 / TensorFlow 1.15) on Backend.AI" && \
219
223
cat /usr/local/share/jupyter/kernels/python3/kernel.json
0 commit comments