-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.notebook
31 lines (31 loc) · 1.7 KB
/
Dockerfile.notebook
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
FROM jupyter/datascience-notebook
USER root
ENV DEBCONF_NOWARNINGS yes
RUN apt-get update
RUN apt-get install -y curl
RUN apt-get install -y file
RUN apt-get install -y mecab
RUN apt-get install -y libmecab-dev
RUN apt-get install -y mecab-ipadic-utf8
RUN apt-get install -y libpq-dev fonts-ipafont fonts-ipaexfont
RUN cp /usr/share/fonts/opentype/ipaexfont-gothic/ipaexg.ttf /opt/conda/lib/python3.7/site-packages/matplotlib/mpl-data/fonts/ttf/ipaexg.ttf
RUN echo "font.family : IPAexGothic" >> /opt/conda/lib/python3.7/site-packages/matplotlib/mpl-data/matplotlibrc
RUN rm -rf ./.cache
ARG username=jovyan
ARG password=jovyan12345
RUN echo "${username}:${password}" | chpasswd
RUN gpasswd -a ${username} sudo
RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
USER jovyan
RUN pip install --upgrade pip
RUN pip install --upgrade setuptools
RUN pip install --no-cache-dir ipython-sql psycopg2 kaggle python-Levenshtein tensorflow gensim python-Levenshtein pykalman hmmlearn pystan pymc3 statsmodels arviz
RUN git clone https://github.com/neologd/mecab-ipadic-neologd.git
RUN ./mecab-ipadic-neologd/bin/install-mecab-ipadic-neologd -n -a -y
RUN pip install mecab-python3
RUN rm -rf mecab-ipadic-neologd
COPY ./kaggle.json /home/jovyan/.kaggle/
COPY ./apputils-extension/themes.jupyterlab-settings /home/jovyan/.jupyter/lab/user-settings/@jupyterlab/apputils-extension/
COPY ./terminal-extension/plugin.jupyterlab-settings /home/jovyan/.jupyter/lab/user-settings/@jupyterlab/terminal-extension/
RUN Rscript -e "install.packages(c('DBI', 'RPostgreSQL', 'rstan', 'brms', 'extrafont', 'ggfortify'), dependencies = TRUE, error = TRUE, repos='https://cloud.r-project.org')"
RUN Rscript -e "library(extrafont) ; font_import(prompt = FALSE)"