Skip to content

Commit bc2f35d

Browse files
committed
fix long time dependency check
1 parent 6c91e36 commit bc2f35d

File tree

1 file changed

+19
-33
lines changed

1 file changed

+19
-33
lines changed

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

Lines changed: 19 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
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
33

44
RUN apt-get update && \
55
apt-get install -y libsm6 libxext6 libxrender-dev mercurial libgdal-dev python3-gdal \
@@ -16,6 +16,12 @@ ENV DEBIAN_FRONTEND=noninteractive \
1616
mecab_dicdir=/usr/local/lib/mecab/dic/mecab-ko-dic \
1717
LANG=C.UTF-8
1818

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+
1925
# install NLP packages *mecab-ko & khai*
2026
RUN apt-get update && \
2127
apt-get install -y \
@@ -78,7 +84,7 @@ RUN ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h && \
7884
rm -rf /var/lib/apt/lists/
7985

8086
WORKDIR /tmp
81-
ENV OPENCV_VERSION="4.5.0"
87+
ENV OPENCV_VERSION="4.5.1"
8288
RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
8389
wget -O opencv-contrib.zip https://github.com/opencv/opencv_contrib/archive/${OPENCV_VERSION}.zip && \
8490
unzip ${OPENCV_VERSION}.zip && \
@@ -103,7 +109,7 @@ RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
103109
-D WITH_V4L=ON \
104110
-D BUILD_TESTS=OFF \
105111
-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" \
107113
-D CMAKE_BUILD_TYPE=RELEASE \
108114
-D CMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)") \
109115
-D PYTHON_EXECUTABLE=$(which python3) \
@@ -116,11 +122,6 @@ RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
116122
python3 -m pip install --no-cache-dir opencv-python && \
117123
rm -fr opencv*
118124

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
124125

125126
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
126127
apt-get update -y && \
@@ -148,37 +149,22 @@ RUN mkdir -p /opt/oracle && \
148149
echo /opt/oracle/instantclient* > /etc/ld.so.conf.d/oracle-instantclient.conf && \
149150
ldconfig
150151

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
166159
# Install scipy
167160
RUN cd /tmp && \
168161
git clone --branch=v${SCIPY_VERSION} --depth=1 https://github.com/scipy/scipy.git scipy && \
169162
cd scipy && \
170163
git checkout -b v${SCIPY_VERSION} && \
171164
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 .
177167

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
182168

183169
# install git-lfs
184170
WORKDIR /tmp
@@ -234,7 +220,7 @@ RUN apt autoclean && \
234220
rm -rf /tmp/*
235221

236222
# 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" && \
238224
cat /usr/local/share/jupyter/kernels/python3/kernel.json
239225

240226
# Backend.AI specifics

0 commit comments

Comments
 (0)