Skip to content

Commit fd627cd

Browse files
committed
clean up NGC 21.03 TF1
1 parent c3447c4 commit fd627cd

File tree

1 file changed

+30
-26
lines changed

1 file changed

+30
-26
lines changed

vendor/ngc-tensorflow/Dockerfile.21.03-tf1-py3

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,24 @@ FROM nvcr.io/nvidia/tensorflow:21.03-tf1-py3
22
# NVIDIA DIGITS runs on Python 3.8
33

44
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
815

9-
ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
10-
ENV C_INCLUDE_PATH=/usr/include/gdal
1116
ENV DEBIAN_FRONTEND=noninteractive \
1217
MPLBACKEND=Svg \
1318
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 \
1423
LD_LIBRARY_PATH="/usr/local/cuda/extras/CUPTI/lib64:/usr/local/cuda/lib64:/usr/local/nvidia/lib64:/usr/include/x86_64-linux-gnu" \
1524
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" \
1625
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
2130
# install NLP packages *mecab-ko & khai*
2231
RUN apt-get update && \
2332
apt-get install -y \
24-
openjdk-8-jdk \
25-
libasound2-dev \
26-
gfortran \
2733
automake \
34+
gfortran \
35+
openjdk-8-jdk \
2836
&& \
2937
cd /tmp && \
3038
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 && \
7482
libgoogle-glog-dev libgflags-dev \
7583
libgphoto2-dev \
7684
libeigen3-dev \
77-
libhdf5-dev \
78-
&& \
79-
apt-get clean && \
80-
rm -rf /var/lib/apt/lists/
85+
libhdf5-dev
8186

8287
WORKDIR /tmp
8388
ENV OPENCV_VERSION="4.5.2"
@@ -148,19 +153,9 @@ RUN mkdir -p /opt/oracle && \
148153
WORKDIR /tmp
149154
RUN python3 -m pip install --no-cache-dir \
150155
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
164159

165160
# install git-lfs
166161
WORKDIR /tmp
@@ -169,7 +164,11 @@ RUN curl -sLO https://github.com/git-lfs/git-lfs/releases/download/v2.12.1/git-l
169164
bash install.sh && \
170165
rm -rf /tmp/*
171166

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+
173172
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 && \
174173
mv /usr/local/lib/code-server-3.7.3-linux-amd64 /usr/local/lib/code-server-3.7.3 && \
175174
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 && \
210209

211210
RUN apt autoclean && \
212211
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 && \
213213
rm -rf /var/lib/apt/lists/* && \
214214
rm -rf /root/.cache && \
215215
rm -rf /tmp/*
216216

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+
217221
# Install ipython kernelspec
218222
RUN /usr/bin/python3 -m ipykernel install --display-name "Python 3.8 (NGC 21.03 / TensorFlow 1.15) on Backend.AI" && \
219223
cat /usr/local/share/jupyter/kernels/python3/kernel.json

0 commit comments

Comments
 (0)