@@ -2,12 +2,6 @@ FROM ubuntu:18.04
2
2
3
3
ARG WHL_DIR="/tmp/pip"
4
4
5
-
6
-
7
-
8
-
9
-
10
-
11
5
# Python 2.7 or 3.6 is supported by Ubuntu Bionic out of the box
12
6
ARG python=3.6
13
7
ENV PYTHON_VERSION=${python}
@@ -114,6 +108,12 @@ WORKDIR /tmp
114
108
RUN curl https://bootstrap.pypa.io/get-pip.py | python3 && \
115
109
python3 -m pip install --no-cache-dir -U setuptools pip
116
110
111
+ RUN wget https://github.com/Kitware/CMake/releases/download/v3.15.3/cmake-3.15.3-Linux-x86_64.sh \
112
+ -q -O /tmp/cmake-install.sh && \
113
+ chmod u+x /tmp/cmake-install.sh && \
114
+ mkdir /usr/bin/cmake && \
115
+ /tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake && \
116
+ rm /tmp/cmake-install.sh
117
117
118
118
COPY ./numpy-1.18.5-cp36-cp36m-manylinux2010_x86_64.whl /tmp
119
119
COPY ./pandas-1.0.4+4.g29edbab4a-cp36-cp36m-linux_x86_64.whl /tmp
@@ -146,8 +146,10 @@ RUN python3 -m pip install pip --no-cache-dir \
146
146
WORKDIR /tmp
147
147
COPY ./requirements.20.08.txt /tmp
148
148
RUN python3 -m pip install --no-cache-dir --upgrade -r requirements.20.08.txt && \
149
+ python3 -m pip uninstall -y tensorboard tensorboard-plugin-wit tensorflow tensorflow-estimator && \
149
150
rm -f /tmp/*.whl /tmp/requirements.20.08.txt
150
151
152
+ # install NLP packages *mecab-ko & khai*
151
153
RUN apt-get update && \
152
154
apt-get install -y \
153
155
openjdk-8-jdk \
@@ -184,10 +186,11 @@ RUN git clone https://github.com/kakao/khaiii.git && \
184
186
cd build && \
185
187
cmake .. && \
186
188
make all && \
187
- make resource && \
189
+ make large_resource && \
188
190
make install && \
189
191
make package_python && \
190
- python3 -m pip install package_python
192
+ cd package_python && \
193
+ python3 -m pip install .
191
194
192
195
# OpenCV
193
196
RUN ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h && \
@@ -218,13 +221,6 @@ RUN ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h && \
218
221
apt-get clean && \
219
222
rm -rf /var/lib/apt/lists/
220
223
221
- RUN wget https://github.com/Kitware/CMake/releases/download/v3.15.3/cmake-3.15.3-Linux-x86_64.sh \
222
- -q -O /tmp/cmake-install.sh && \
223
- chmod u+x /tmp/cmake-install.sh && \
224
- mkdir /usr/bin/cmake && \
225
- /tmp/cmake-install.sh --skip-license --prefix=/usr/bin/cmake && \
226
- rm /tmp/cmake-install.sh
227
-
228
224
WORKDIR /tmp
229
225
ENV OPENCV_VERSION="4.4.0"
230
226
RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
@@ -247,7 +243,7 @@ RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
247
243
-D WITH_V4L=ON \
248
244
-D BUILD_TESTS=OFF \
249
245
-D BUILD_PERF_TESTS=OFF \
250
- -D OPENCV_EXTRA_MODULES_PATH="../../opencv_contrib-4.3 .0/modules" \
246
+ -D OPENCV_EXTRA_MODULES_PATH="../../opencv_contrib-4.4 .0/modules" \
251
247
-D CMAKE_BUILD_TYPE=RELEASE \
252
248
-D CMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)" ) \
253
249
-D PYTHON_EXECUTABLE=$(which python3) \
@@ -279,10 +275,8 @@ RUN git clone --recursive https://github.com/Microsoft/LightGBM && \
279
275
cd ../python-package && \
280
276
python3 setup.py install --precompile
281
277
282
-
283
- WORKDIR /root
284
-
285
278
# Install Open MPI
279
+ WORKDIR /root
286
280
RUN mkdir /tmp/openmpi && \
287
281
cd /tmp/openmpi && \
288
282
wget https://www.open-mpi.org/software/ompi/v4.0/downloads/openmpi-4.0.4.tar.gz && \
@@ -293,33 +287,29 @@ RUN mkdir /tmp/openmpi && \
293
287
make install && \
294
288
ldconfig && \
295
289
rm -rf /tmp/openmpi*
296
-
297
290
# Install OpenSSH for MPI to communicate between containers
298
291
RUN apt-get install -y --no-install-recommends openssh-client openssh-server && \
299
292
mkdir -p /var/run/sshd
300
-
301
293
# Allow OpenSSH to talk to containers without asking for confirmation
302
294
RUN cat /etc/ssh/ssh_config | grep -v StrictHostKeyChecking > /etc/ssh/ssh_config.new && \
303
295
echo " StrictHostKeyChecking no" >> /etc/ssh/ssh_config.new && \
304
296
mv /etc/ssh/ssh_config.new /etc/ssh/ssh_config
305
-
306
297
# Create a wrapper for OpenMPI to allow running as root by default
307
298
RUN mv /usr/local/bin/mpirun /usr/local/bin/mpirun.real && \
308
299
echo '#!/bin/bash' > /usr/local/bin/mpirun && \
309
300
echo 'mpirun.real --allow-run-as-root "$@"' >> /usr/local/bin/mpirun && \
310
301
chmod a+x /usr/local/bin/mpirun
311
-
312
302
# Configure OpenMPI to run good defaults:
313
303
RUN echo "btl_tcp_if_exclude = lo,docker0" >> /usr/local/etc/openmpi-mca-params.conf
314
-
315
304
# Install OpenSSH for MPI to communicate between containers
316
305
RUN mkdir -p /var/run/sshd
317
-
318
306
# Allow OpenSSH to talk to containers without asking for confirmation
319
307
RUN cat /etc/ssh/ssh_config | grep -v StrictHostKeyChecking > /etc/ssh/ssh_config.new && \
320
308
echo " StrictHostKeyChecking no" >> /etc/ssh/ssh_config.new && \
321
309
mv /etc/ssh/ssh_config.new /etc/ssh/ssh_config
322
310
311
+ # install git-lfs
312
+ WORKDIR /tmp
323
313
RUN curl -sLO https://github.com/git-lfs/git-lfs/releases/download/v2.11.0/git-lfs-linux-amd64-v2.11.0.tar.gz && \
324
314
tar -zxf git-lfs-linux-amd64-v2.11.0.tar.gz && \
325
315
bash install.sh && \
@@ -341,7 +331,6 @@ RUN jupyter nbextensions_configurator enable && \
341
331
jupyter labextension install --no-build @jupyterlab/toc && \
342
332
jupyter lab build
343
333
344
-
345
334
RUN apt autoclean && \
346
335
rm -rf /var/lib/apt/lists/* && \
347
336
rm -rf /root/.cache && \
0 commit comments