Skip to content

Commit 5878c48

Browse files
committed
add khaiii on Base kernel 20.08 for CPU
1 parent ab5d972 commit 5878c48

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

commons/Dockerfile.base.20.08-py36

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
FROM ubuntu:18.04
22

3+
ARG WHL_DIR="/tmp/pip"
4+
5+
6+
7+
8+
9+
10+
311
# Python 2.7 or 3.6 is supported by Ubuntu Bionic out of the box
412
ARG python=3.6
513
ENV PYTHON_VERSION=${python}
6-
ARG WHL_DIR="/tmp/pip"
714

815
ENV DEBIAN_FRONTEND=noninteractive \
916
MPLBACKEND=Svg \
1017
PYTHONUNBUFFERED=1 \
18+
\
19+
\
1120
PATH="/usr/local/sbin:/usr/bin/cmake/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/bin/mecab" \
21+
mecab_dicdir=/usr/local/lib/mecab/dic/mecab-ko-dic \
1222
LANG=C.UTF-8
1323

1424
# Set default shell to /bin/bash
@@ -109,6 +119,8 @@ COPY ./numpy-1.18.5-cp36-cp36m-manylinux2010_x86_64.whl /tmp
109119
COPY ./pandas-1.0.4+4.g29edbab4a-cp36-cp36m-linux_x86_64.whl /tmp
110120

111121
RUN python3 -m pip install --no-cache-dir --upgrade -Iv \
122+
git+https://github.com/haven-jeon/PyKoSpacing.git \
123+
git+https://github.com/ssut/py-hanspell.git \
112124
Cython==0.29.20 \
113125
/tmp/numpy-1.18.5-cp36-cp36m-manylinux2010_x86_64.whl \
114126
/tmp/pandas-1.0.4+4.g29edbab4a-cp36-cp36m-linux_x86_64.whl \
@@ -127,7 +139,6 @@ RUN git clone --recursive https://github.com/bodono/scs-python.git && \
127139
cd /tmp/scs-python && \
128140
python3 setup.py install --scs
129141

130-
131142
RUN python3 -m pip install pip --no-cache-dir \
132143
Cartopy==0.18.0 \
133144
notebook==6.0.3
@@ -166,6 +177,18 @@ RUN echo "Install mecab-ko-dic" && \
166177
git clone https://bitbucket.org/eunjeon/mecab-python-0.996.git && \
167178
python3 -m pip install /tmp/mecab-python-0.996
168179

180+
WORKDIR /tmp
181+
RUN git clone https://github.com/kakao/khaiii.git && \
182+
cd khaiii && \
183+
mkdir -p build && \
184+
cd build && \
185+
cmake .. && \
186+
make all && \
187+
make resource && \
188+
make install && \
189+
make package_python && \
190+
python3 -m pip install package_python
191+
169192
# OpenCV
170193
RUN ln -s /usr/include/libv4l1-videodev.h /usr/include/linux/videodev.h && \
171194
apt-get install -y \
@@ -203,7 +226,7 @@ RUN wget https://github.com/Kitware/CMake/releases/download/v3.15.3/cmake-3.15.3
203226
rm /tmp/cmake-install.sh
204227

205228
WORKDIR /tmp
206-
ENV OPENCV_VERSION="4.3.0"
229+
ENV OPENCV_VERSION="4.4.0"
207230
RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
208231
wget -O opencv-contrib.zip https://github.com/opencv/opencv_contrib/archive/${OPENCV_VERSION}.zip && \
209232
unzip ${OPENCV_VERSION}.zip && \

0 commit comments

Comments
 (0)