1
- FROM nvcr.io/nvidia/tensorflow:20.12 -tf2-py3
1
+ 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
6
-
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
8
+
9
+ ENV CPLUS_INCLUDE_PATH=/usr/include/gdal
10
+ ENV C_INCLUDE_PATH=/usr/include/gdal
7
11
ENV DEBIAN_FRONTEND=noninteractive \
8
12
MPLBACKEND=Svg \
9
13
PYTHONUNBUFFERED=1 \
@@ -12,6 +16,8 @@ ENV DEBIAN_FRONTEND=noninteractive \
12
16
mecab_dicdir=/usr/local/lib/mecab/dic/mecab-ko-dic \
13
17
LANG=C.UTF-8
14
18
19
+ RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 2
20
+
15
21
# install NLP packages *mecab-ko & khai*
16
22
RUN apt-get update && \
17
23
apt-get install -y \
@@ -44,7 +50,6 @@ RUN echo "Install mecab-ko-dic" && \
44
50
git clone https://bitbucket.org/eunjeon/mecab-python-0.996.git && \
45
51
python3 -m pip install /tmp/mecab-python-0.996
46
52
47
-
48
53
# OpenCV
49
54
RUN ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h && \
50
55
apt-get install -y \
@@ -75,7 +80,7 @@ RUN ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h && \
75
80
rm -rf /var/lib/apt/lists/
76
81
77
82
WORKDIR /tmp
78
- ENV OPENCV_VERSION="4.5.0 "
83
+ ENV OPENCV_VERSION="4.5.1 "
79
84
RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
80
85
wget -O opencv-contrib.zip https://github.com/opencv/opencv_contrib/archive/${OPENCV_VERSION}.zip && \
81
86
unzip ${OPENCV_VERSION}.zip && \
@@ -100,7 +105,7 @@ RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
100
105
-D WITH_V4L=ON \
101
106
-D BUILD_TESTS=OFF \
102
107
-D BUILD_PERF_TESTS=OFF \
103
- -D OPENCV_EXTRA_MODULES_PATH="../../opencv_contrib-4.5.0 /modules" \
108
+ -D OPENCV_EXTRA_MODULES_PATH="../../opencv_contrib-4.5.1 /modules" \
104
109
-D CMAKE_BUILD_TYPE=RELEASE \
105
110
-D CMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)" ) \
106
111
-D PYTHON_EXECUTABLE=$(which python3) \
@@ -113,53 +118,50 @@ RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
113
118
python3 -m pip install --no-cache-dir opencv-python && \
114
119
rm -fr opencv*
115
120
116
- RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 2
117
-
118
- WORKDIR /tmp
119
- RUN curl https://bootstrap.pypa.io/get-pip.py | python3 && \
120
- python3 -m pip install --no-cache-dir -U setuptools pip
121
121
122
122
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
123
123
apt-get update -y && \
124
124
apt-get install -y nodejs
125
125
126
126
WORKDIR /tmp
127
- RUN git clone -q --branch=master git://github.com/xianyi/OpenBLAS.git && \
127
+ RUN git clone -q --branch=v0.3.13 git://github.com/xianyi/OpenBLAS.git && \
128
128
cd OpenBLAS && \
129
129
make DYNAMIC_ARCH=1 NO_AFFINITY=1 NUM_THREADS=48 FC=gfortran && \
130
130
make install
131
131
RUN git clone --recursive https://github.com/bodono/scs-python.git && \
132
132
cd /tmp/scs-python && \
133
133
python setup.py install --scs --gpu
134
+ RUN mkdir -p /opt/oracle && \
135
+ cd /opt/oracle && \
136
+ apt-get clean && \
137
+ rm -rf /var/lib/apt/lists/* && \
138
+ apt-get update -y && \
139
+ apt-get install -y --no-install-recommends libaio1 default-libmysqlclient-dev && \
140
+ wget https://download.oracle.com/otn_software/linux/instantclient/instantclient-basiclite-linuxx64.zip && \
141
+ unzip instantclient-basiclite-linuxx64.zip && \
142
+ rm -f instantclient-basiclite-linuxx64.zip && \
143
+ cd /opt/oracle/instantclient* && \
144
+ rm -f *jdbc* *occi* *mysql* *README *jar uidrvci genezi adrci && \
145
+ echo /opt/oracle/instantclient* > /etc/ld.so.conf.d/oracle-instantclient.conf && \
146
+ ldconfig
134
147
135
- COPY ./numpy-1.19.4-cp36-cp36m-manylinux2010_x86_64.whl /tmp
136
- COPY ./pandas-1.0.4+4.g29edbab4a-cp36-cp36m-linux_x86_64.whl /tmp
137
- RUN python3 -m pip install --no-cache-dir \
138
- Cython==0.29.21 \
139
- tornado==6.0.4 \
140
- pystan==2.19.1.1 \
141
- pycairo==1.19.0 \
142
- jupyter==1.0.0 \
143
- python-language-server[all] \
144
- matplotlib==3.3.3
145
- ENV SCIPY_VERSION 1.5.4
148
+ WORKDIR /tmp
149
+ RUN python3 -m pip install --no-cache-dir \
150
+ Cython==0.29.21 \
151
+ argon2_cffi==20.1.0
152
+ COPY ./requirements.txt /tmp
153
+ RUN python3 -m pip install --no-cache-dir -r requirements.txt && \
154
+ rm -f /tmp/*.whl /tmp/requirements.txt
155
+ ENV SCIPY_VERSION 1.6.0
146
156
# Install scipy
147
157
RUN cd /tmp && \
148
158
git clone --branch=v${SCIPY_VERSION} --depth=1 https://github.com/scipy/scipy.git scipy && \
149
159
cd scipy && \
150
160
git checkout -b v${SCIPY_VERSION} && \
151
161
cp site.cfg.example site.cfg && \
152
- python3 -m pip install -U --no-cache-dir \
153
- /tmp/numpy-1.19.4-cp36-cp36m-manylinux2010_x86_64.whl \
154
- /tmp/pandas-1.0.4+4.g29edbab4a-cp36-cp36m-linux_x86_64.whl \
155
- && \
156
- python3 setup.py install
157
-
158
- WORKDIR /tmp
159
- COPY ./requirements.txt /tmp
160
- RUN python3 -m pip install --no-cache-dir --upgrade -r requirements.txt && \
161
- python3 -m pip install --no-cache-dir tensorflow_model_analysis && \
162
- rm -f /tmp/*.whl /tmp/requirements.txt
162
+ pip uninstall -y typing && \
163
+ python3 -m pip install .
164
+
163
165
164
166
# install git-lfs
165
167
WORKDIR /tmp
@@ -172,7 +174,25 @@ COPY ./service-defs /etc/backend.ai/service-defs
172
174
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 && \
173
175
mv /usr/local/lib/code-server-3.7.3-linux-amd64 /usr/local/lib/code-server-3.7.3 && \
174
176
ln -s /usr/local/lib/code-server-3.7.3/bin/code-server /usr/local/bin/code-server
177
+ # Install Open MPI
178
+ RUN mkdir /tmp/openmpi && \
179
+ cd /tmp/openmpi && \
180
+ wget https://www.open-mpi.org/software/ompi/v4.0/downloads/openmpi-4.0.5.tar.gz && \
181
+ tar zxf openmpi-4.0.5.tar.gz && \
182
+ cd openmpi-4.0.5 && \
183
+ ./configure --enable-orterun-prefix-by-default && \
184
+ make -j $(nproc) all && \
185
+ make install && \
186
+ ldconfig && \
187
+ rm -rf /tmp/openmpi*
188
+ # Create a wrapper for OpenMPI to allow running as root by default
189
+ RUN mv /usr/local/bin/mpirun /usr/local/bin/mpirun.real && \
190
+ echo '#!/bin/bash' > /usr/local/bin/mpirun && \
191
+ echo 'mpirun.real --allow-run-as-root "$@"' >> /usr/local/bin/mpirun && \
192
+ chmod a+x /usr/local/bin/mpirun
175
193
194
+ # Configure OpenMPI to run good defaults:
195
+ RUN echo "btl_tcp_if_exclude = lo,docker0" >> /usr/local/etc/openmpi-mca-params.conf
176
196
177
197
RUN jupyter nbextensions_configurator enable && \
178
198
jupyter contrib nbextension install && \
@@ -191,13 +211,12 @@ RUN jupyter nbextensions_configurator enable && \
191
211
192
212
RUN apt autoclean && \
193
213
sed -i 's/source \/ usr\/ local\/ nvm\/ nvm.sh//' /etc/bash.bashrc && \
194
- python3 -m pip uninstall -y tensorboard-plugin-wit && \
195
214
rm -rf /var/lib/apt/lists/* && \
196
215
rm -rf /root/.cache && \
197
216
rm -rf /tmp/*
198
217
199
218
# Install ipython kernelspec
200
- RUN /usr/bin/python3 -m ipykernel install --display-name "Python 3.6 (NGC 20.12 / TensorFlow 2.3) on Backend.AI" && \
219
+ RUN /usr/bin/python3 -m ipykernel install --display-name "Python 3.6 (NGC 20.11 / TensorFlow 2.3) on Backend.AI" && \
201
220
cat /usr/local/share/jupyter/kernels/python3/kernel.json
202
221
203
222
# Backend.AI specifics
0 commit comments