1
1
FROM nvcr.io/nvidia/tensorflow:20.12-tf1-py3
2
- # NVIDIA DIGITS runs on Python 3.6
2
+ # NVIDIA DIGITS runs on Python 3.8
3
3
4
4
RUN apt-get update && \
5
5
apt-get install -y libsm6 libxext6 libxrender-dev mercurial libgdal-dev python3-gdal \
@@ -16,6 +16,12 @@ ENV DEBIAN_FRONTEND=noninteractive \
16
16
mecab_dicdir=/usr/local/lib/mecab/dic/mecab-ko-dic \
17
17
LANG=C.UTF-8
18
18
19
+ RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 2
20
+
21
+ # WORKDIR /tmp
22
+ # RUN curl https://bootstrap.pypa.io/get-pip.py | python3 && \
23
+ # python3 -m pip install --no-cache-dir -U setuptools pip
24
+
19
25
# install NLP packages *mecab-ko & khai*
20
26
RUN apt-get update && \
21
27
apt-get install -y \
@@ -78,7 +84,7 @@ RUN ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h && \
78
84
rm -rf /var/lib/apt/lists/
79
85
80
86
WORKDIR /tmp
81
- ENV OPENCV_VERSION="4.5.0 "
87
+ ENV OPENCV_VERSION="4.5.1 "
82
88
RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
83
89
wget -O opencv-contrib.zip https://github.com/opencv/opencv_contrib/archive/${OPENCV_VERSION}.zip && \
84
90
unzip ${OPENCV_VERSION}.zip && \
@@ -103,7 +109,7 @@ RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
103
109
-D WITH_V4L=ON \
104
110
-D BUILD_TESTS=OFF \
105
111
-D BUILD_PERF_TESTS=OFF \
106
- -D OPENCV_EXTRA_MODULES_PATH="../../opencv_contrib-4.5.0 /modules" \
112
+ -D OPENCV_EXTRA_MODULES_PATH="../../opencv_contrib-4.5.1 /modules" \
107
113
-D CMAKE_BUILD_TYPE=RELEASE \
108
114
-D CMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)" ) \
109
115
-D PYTHON_EXECUTABLE=$(which python3) \
@@ -116,11 +122,6 @@ RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
116
122
python3 -m pip install --no-cache-dir opencv-python && \
117
123
rm -fr opencv*
118
124
119
- RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 2
120
-
121
- WORKDIR /tmp
122
- RUN curl https://bootstrap.pypa.io/get-pip.py | python3 && \
123
- python3 -m pip install --no-cache-dir -U setuptools pip
124
125
125
126
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
126
127
apt-get update -y && \
@@ -148,37 +149,22 @@ RUN mkdir -p /opt/oracle && \
148
149
echo /opt/oracle/instantclient* > /etc/ld.so.conf.d/oracle-instantclient.conf && \
149
150
ldconfig
150
151
151
- RUN python3 -m pip install --no-cache-dir \
152
- Cython==0.29.21 \
153
- tornado==6.0.4 \
154
- pystan==2.19.1.1 \
155
- pycairo==1.19.0 \
156
- jupyter==1.0.0 \
157
- python-language-server[all] \
158
- matplotlib==3.3.3
159
- ENV NUMPY_VERSION 1.19.4
160
- RUN git clone --branch=v${NUMPY_VERSION} --depth=1 https://github.com/numpy/numpy.git numpy && \
161
- cd numpy && \
162
- git checkout -b v${NUMPY_VERSION} && \
163
- cp site.cfg.example site.cfg && \
164
- python3 setup.py bdist_wheel -d /tmp
165
- ENV SCIPY_VERSION 1.5.4
152
+ WORKDIR /tmp
153
+ RUN python3 -m pip install --no-cache-dir \
154
+ argon2_cffi==20.1.0
155
+ COPY ./requirements.txt /tmp
156
+ RUN python3 -m pip install --no-cache-dir -r requirements.txt && \
157
+ rm -f /tmp/*.whl /tmp/requirements.txt
158
+ ENV SCIPY_VERSION 1.6.0
166
159
# Install scipy
167
160
RUN cd /tmp && \
168
161
git clone --branch=v${SCIPY_VERSION} --depth=1 https://github.com/scipy/scipy.git scipy && \
169
162
cd scipy && \
170
163
git checkout -b v${SCIPY_VERSION} && \
171
164
cp site.cfg.example site.cfg && \
172
- python3 -m pip install -U --no-cache-dir \
173
- /tmp/numpy-1.19.4-cp38-cp38-linux_x86_64.whl \
174
- pandas==1.2.0 \
175
- && \
176
- python3 setup.py install
165
+ pip uninstall -y typing && \
166
+ python3 -m pip install .
177
167
178
- WORKDIR /tmp
179
- COPY ./requirements.txt /tmp
180
- RUN python3 -m pip install --no-cache-dir -r requirements.txt && \
181
- rm -f /tmp/*.whl /tmp/requirements.txt
182
168
183
169
# install git-lfs
184
170
WORKDIR /tmp
@@ -234,7 +220,7 @@ RUN apt autoclean && \
234
220
rm -rf /tmp/*
235
221
236
222
# Install ipython kernelspec
237
- RUN /usr/bin/python3 -m ipykernel install --display-name "Python 3.6 (NGC 20.12 / TensorFlow 1.15) on Backend.AI" && \
223
+ RUN /usr/bin/python3 -m ipykernel install --display-name "Python 3.8 (NGC 20.12 / TensorFlow 1.15) on Backend.AI" && \
238
224
cat /usr/local/share/jupyter/kernels/python3/kernel.json
239
225
240
226
# Backend.AI specifics
0 commit comments