Skip to content

Commit ef4e8b5

Browse files
committed
fixed long time dependency check
1 parent 9e717c6 commit ef4e8b5

File tree

1 file changed

+26
-44
lines changed

1 file changed

+26
-44
lines changed

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

Lines changed: 26 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
FROM nvcr.io/nvidia/tensorflow:20.12-tf2-py3
2-
# NVIDIA DIGITS runs on Python 3.6
2+
# NVIDIA DIGITS runs on Python 3.8
33

44
RUN apt-get update && \
5-
apt-get install -y libsm6 libxext6 libxrender-dev mercurial libopenblas-dev
5+
apt-get install -y libsm6 libxext6 libxrender-dev
66

77
ENV DEBIAN_FRONTEND=noninteractive \
88
MPLBACKEND=Svg \
@@ -12,6 +12,12 @@ ENV DEBIAN_FRONTEND=noninteractive \
1212
mecab_dicdir=/usr/local/lib/mecab/dic/mecab-ko-dic \
1313
LANG=C.UTF-8
1414

15+
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 2
16+
17+
#WORKDIR /tmp
18+
#RUN curl https://bootstrap.pypa.io/get-pip.py | python3 && \
19+
# python3 -m pip install --no-cache-dir -U setuptools pip
20+
1521
# install NLP packages *mecab-ko & khai*
1622
RUN apt-get update && \
1723
apt-get install -y \
@@ -44,6 +50,7 @@ RUN echo "Install mecab-ko-dic" && \
4450
git clone https://bitbucket.org/eunjeon/mecab-python-0.996.git && \
4551
python3 -m pip install /tmp/mecab-python-0.996
4652

53+
4754
# OpenCV
4855
RUN ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h && \
4956
apt-get install -y \
@@ -74,7 +81,7 @@ RUN ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h && \
7481
rm -rf /var/lib/apt/lists/
7582

7683
WORKDIR /tmp
77-
ENV OPENCV_VERSION="4.5.0"
84+
ENV OPENCV_VERSION="4.5.1"
7885
RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
7986
wget -O opencv-contrib.zip https://github.com/opencv/opencv_contrib/archive/${OPENCV_VERSION}.zip && \
8087
unzip ${OPENCV_VERSION}.zip && \
@@ -99,7 +106,7 @@ RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
99106
-D WITH_V4L=ON \
100107
-D BUILD_TESTS=OFF \
101108
-D BUILD_PERF_TESTS=OFF \
102-
-D OPENCV_EXTRA_MODULES_PATH="../../opencv_contrib-4.5.0/modules" \
109+
-D OPENCV_EXTRA_MODULES_PATH="../../opencv_contrib-4.5.1/modules" \
103110
-D CMAKE_BUILD_TYPE=RELEASE \
104111
-D CMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)") \
105112
-D PYTHON_EXECUTABLE=$(which python3) \
@@ -112,46 +119,39 @@ RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
112119
python3 -m pip install --no-cache-dir opencv-python && \
113120
rm -fr opencv*
114121

115-
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 2
116-
117-
WORKDIR /tmp
118-
RUN curl https://bootstrap.pypa.io/get-pip.py | python3 && \
119-
python3 -m pip install --no-cache-dir -U setuptools pip
120122

121123
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \
122124
apt-get update -y && \
123125
apt-get install -y nodejs
124126

125127
WORKDIR /tmp
126-
RUN cd /tmp && \
127-
git clone --recursive https://github.com/bodono/scs-python.git && \
128-
cd scs-python && \
129-
python3 setup.py install --scs --gpu
128+
RUN git clone -q --branch=v0.3.13 git://github.com/xianyi/OpenBLAS.git && \
129+
cd OpenBLAS && \
130+
make DYNAMIC_ARCH=1 NO_AFFINITY=1 NUM_THREADS=48 FC=gfortran && \
131+
make install
132+
RUN git clone --recursive https://github.com/bodono/scs-python.git && \
133+
cd /tmp/scs-python && \
134+
python setup.py install --scs --gpu
130135

131-
ENV NUMPY_VERSION 1.19.4
132-
ENV SCIPY_VERSION 1.5.4
133-
RUN python3 -m pip install --no-cache-dir \
136+
RUN python3 -m pip install --no-cache-dir \
137+
argon2_cffi==20.1.0 \
134138
Cython==0.29.21 \
135139
tornado==6.0.4 \
136140
pystan==2.19.1.1 \
137141
pycairo==1.19.0 \
138142
jupyter==1.0.0 \
139-
python-language-server[all] \
143+
python-language-server[all] \
144+
numpy==1.20.1 \
145+
pandas==1.2.1 \
140146
matplotlib==3.3.3
141-
RUN git clone --branch=v${NUMPY_VERSION} --depth=1 https://github.com/numpy/numpy.git numpy && \
142-
cd numpy && \
143-
git checkout -b v${NUMPY_VERSION} && \
144-
cp site.cfg.example site.cfg && \
145-
python3 setup.py bdist_wheel -d /tmp
146-
147+
ENV SCIPY_VERSION 1.6.0
147148
# Install scipy
148149
RUN cd /tmp && \
149150
git clone --branch=v${SCIPY_VERSION} --depth=1 https://github.com/scipy/scipy.git scipy && \
150151
cd scipy && \
151152
git checkout -b v${SCIPY_VERSION} && \
152153
cp site.cfg.example site.cfg && \
153-
python3 -m pip install -U --no-cache-dir /tmp/numpy-*.whl && \
154-
python3 setup.py install
154+
python3 -m pip install .
155155

156156
WORKDIR /tmp
157157
COPY ./requirements.txt /tmp
@@ -170,25 +170,7 @@ COPY ./service-defs /etc/backend.ai/service-defs
170170
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 && \
171171
mv /usr/local/lib/code-server-3.7.3-linux-amd64 /usr/local/lib/code-server-3.7.3 && \
172172
ln -s /usr/local/lib/code-server-3.7.3/bin/code-server /usr/local/bin/code-server
173-
# Install Open MPI
174-
RUN mkdir /tmp/openmpi && \
175-
cd /tmp/openmpi && \
176-
wget https://www.open-mpi.org/software/ompi/v4.0/downloads/openmpi-4.0.5.tar.gz && \
177-
tar zxf openmpi-4.0.5.tar.gz && \
178-
cd openmpi-4.0.5 && \
179-
./configure --enable-orterun-prefix-by-default && \
180-
make -j $(nproc) all && \
181-
make install && \
182-
ldconfig && \
183-
rm -rf /tmp/openmpi*
184-
# Create a wrapper for OpenMPI to allow running as root by default
185-
RUN mv /usr/local/bin/mpirun /usr/local/bin/mpirun.real && \
186-
echo '#!/bin/bash' > /usr/local/bin/mpirun && \
187-
echo 'mpirun.real --allow-run-as-root "$@"' >> /usr/local/bin/mpirun && \
188-
chmod a+x /usr/local/bin/mpirun
189-
190-
# Configure OpenMPI to run good defaults:
191-
RUN echo "btl_tcp_if_exclude = lo,docker0" >> /usr/local/etc/openmpi-mca-params.conf
173+
192174

193175
RUN jupyter nbextensions_configurator enable && \
194176
jupyter contrib nbextension install && \

0 commit comments

Comments
 (0)