DockerでRstanが使えるJupyterLabのサーバーを建てる

Rstanの環境構築でコケるので。


Rstanの環境構築でコケるので。

Dockerfile

FROM jupyter/datascience-notebook RUN pip install jupyterlab RUN jupyter serverextension enable --py jupyterlab RUN jupyter labextension install @jupyterlab/git RUN pip install jupyterlab-git RUN jupyter serverextension enable --py jupyterlab_git FROM rocker/tidyverse # Change environment to Japanese(Character and DateTime) ENV LANG ja_JP.UTF-8 ENV LC_ALL ja_JP.UTF-8 RUN sed -i '$d' /etc/locale.gen \ && echo "ja_JP.UTF-8 UTF-8" >> /etc/locale.gen \ && locale-gen ja_JP.UTF-8 \ && /usr/sbin/update-locale LANG=ja_JP.UTF-8 LANGUAGE="ja_JP:ja" RUN /bin/bash -c "source /etc/default/locale" RUN ln -sf /usr/share/zoneinfo/Asia/Tokyo /etc/localtime # Install Japanese fonts RUN apt-get update && apt-get install -y \ fonts-ipaexfont # Install packages RUN Rscript -e "install.packages(c('githubinstall','rstan','ggmcmc','bayesplot','brms'))" RUN jupyter lab --no-browser --port=8888

References