Dockerfile 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. FROM jupyter/scipy-notebook:ubuntu-20.04
  2. # mamba installを使いたかったがdatalad pushに失敗するため
  3. # conda installを利用している(2/2時点未検証)
  4. RUN conda install --quiet --yes git-annex==8.20210903 \
  5. && conda install --quiet --yes git==2.35.0 \
  6. && conda install --quiet --yes datalad==0.15.4 \
  7. && conda clean -i -t -y
  8. # install the notebook package etc.
  9. RUN pip install --no-cache --upgrade pip \
  10. && pip install --no-cache notebook \
  11. && pip install --no-cache jupyter_contrib_nbextensions \
  12. && pip install --no-cache git+https://github.com/NII-cloud-operation/Jupyter-LC_run_through \
  13. && pip install --no-cache git+https://github.com/NII-cloud-operation/Jupyter-multi_outputs \
  14. && pip install --no-cache datalad==0.15.4 \
  15. && pip install --no-cache lxml==4.7.1 \
  16. && pip install --no-cache blockdiag==3.0.0 \
  17. && pip install --no-cache nbformat==5.1.3 \
  18. && pip install --no-cache papermill==2.3.3 \
  19. && pip install --no-cache black==21.12b0
  20. RUN jupyter contrib nbextension install --user \
  21. && jupyter nbextensions_configurator enable --user \
  22. && jupyter run-through quick-setup --user \
  23. && jupyter nbextension install --py lc_multi_outputs --user \
  24. && jupyter nbextension enable --py lc_multi_outputs --user
  25. # install Japanese-font (for blockdiag)
  26. ARG font_deb=fonts-ipafont-gothic_00303-18ubuntu1_all.deb
  27. RUN mkdir ${HOME}/.fonts \
  28. && wget -P ${HOME}/.fonts http://archive.ubuntu.com/ubuntu/pool/universe/f/fonts-ipafont/${font_deb} \
  29. && dpkg-deb -x ${HOME}/.fonts/${font_deb} ~/.fonts \
  30. && cp ~/.fonts/usr/share/fonts/opentype/ipafont-gothic/ipag.ttf ~/.fonts/ipag.ttf \
  31. && rm ${HOME}/.fonts/${font_deb} \
  32. && rm -rf ${HOME}/.fonts/etc ${HOME}/.fonts/usr \
  33. && rm .wget-hsts
  34. #install netbase
  35. USER root
  36. RUN sudo apt update -y \
  37. && sudo apt install -y netbase
  38. ARG NB_USER=jovyan
  39. ARG NB_UID=1000
  40. RUN rm -rf ${HOME}/work
  41. # prepare datalad procedure dir
  42. RUN mkdir -p ${HOME}/.config/datalad/procedures
  43. WORKDIR ${HOME}
  44. COPY . ${HOME}
  45. USER root
  46. RUN chown -R ${NB_UID} ${HOME}
  47. USER ${NB_USER}
  48. # Specify the default command to run
  49. CMD ["jupyter", "notebook", "--ip", "0.0.0.0"]