-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
97 lines (83 loc) · 3.32 KB
/
Dockerfile
File metadata and controls
97 lines (83 loc) · 3.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
FROM python:3.9
LABEL multi.version="1.0" multi.maintainer="takapy <takanobu.030210@gmail.com>"
ENV PYTHONUNBUFFERED=TRUE
ENV PYTHONDONTWRITEBYTECODE=TRUE
RUN apt-get -y update && apt-get install -y --no-install-recommends \
curl \
sudo \
graphviz-dev \
graphviz \
mecab \
libmecab-dev \
mecab-ipadic \
mecab-ipadic-utf8 \
git \
wget \
g++ \
make \
cmake \
vim \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Timezone jst
RUN ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime
# nodejsの導入
RUN curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - \
&& sudo apt-get install -y nodejs
# ipadic-neologdの導入
RUN git clone --depth 1 https://github.com/neologd/mecab-ipadic-neologd.git \
&& cd mecab-ipadic-neologd \
&& bin/install-mecab-ipadic-neologd -n -y
# jumanpp
# RUN wget https://github.com/ku-nlp/jumanpp/releases/download/v2.0.0-rc3/jumanpp-2.0.0-rc3.tar.xz && \
# tar xvf jumanpp-2.0.0-rc3.tar.xz && \
# cd jumanpp-2.0.0-rc3 && mkdir build && cd build && cmake .. && make install
# ENV
# Locale Japanese
# ENV LC_ALL=ja_JP.UTF-8
# tensorflowのログレベルをERRORのみに設定
ENV TF_CPP_MIN_LOG_LEVEL=2
# mecabrcが見つからないと怒られるので、環境変数MECABRCにパスを通す。(https://qiita.com/NLPingu/items/6f794635c4ac35889da6)
ENV MECABRC=/etc/mecabrc
# TA-Lib(株価分析)
RUN wget http://prdownloads.sourceforge.net/ta-lib/ta-lib-0.4.0-src.tar.gz
RUN tar -zxvf ta-lib-0.4.0-src.tar.gz && \
cd ta-lib && \
./configure --prefix=/usr && \
make && \
make install && \
cd .. && \
rm -rf ta-lib-0.4.0-src.tar.gz && rm -rf ta-lib
# jupyter lab
RUN python3 -m pip install -U pip && \
python3 -m pip install jupyterlab && \
python3 -m pip install jupyterlab-git && \
mkdir ~/.jupyter
COPY ./jupyter_notebook_config.py /root/.jupyter/jupyter_notebook_config.py
RUN export NODE_OPTIONS=--max-old-space-size=4096
RUN jupyter serverextension enable --py jupyterlab && \
jupyter labextension install --no-build jupyterlab-plotly && \
jupyter labextension install @jupyter-widgets/jupyterlab-manager && \
jupyter labextension install luxwidget && \
# jupyter labextension install --no-build @jupyterlab/toc && \
# jupyter labextension install --no-build jupyterlab-flake8 && \
# jupyter labextension install --no-build jupyterlab-topbar-extension jupyterlab-system-monitor && \
# jupyter labextension install --no-build @jupyter-widgets/jupyterlab-manager && \
# jupyter labextension install --no-build @jupyterlab/debugger && \
jupyter lab build
# RUN git clone https://github.com/K-PTL/noglobal-python
RUN git clone https://github.com/facebookresearch/fastText.git && \
cd fastText && \
python3 -m pip install --no-deps .
COPY requirements.lock /tmp/requirements.lock
RUN python3 -m pip install -U pip && \
python3 -m pip install --no-deps -r /tmp/requirements.lock && \
rm /tmp/requirements.lock && \
rm -rf /root/.cache
# takaggle
# 頻繁に更新するので個別でインストール
# RUN pip3 install -U git+https://github.com/takapy0210/takaggle@v1.0.27 && \
# rm -rf /root/.cache
# Set up the program in the image
COPY working /opt/program/working
WORKDIR /opt/program/working