https://hub.docker.com/r/jupyter/datascience-notebook/tags
第一步 拉取 Jupyter Docker Stacks
1
| docker pull jupyter/datascience-notebook:r-4.1.2
|
第二步 编写自动内网穿透脚本
1 2 3
| #!/usr/bin/sh HOME=/home/jovyan nohup $HOME/dev/frp_0.38.0_linux_amd64/frpc -c $HOME/etc/frpc.ini > $HOME/log/frp.log 2>&1 &
|
第三步 编写docker启动脚本
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| #!/bin/sh docker run -d -p 57002:8888 --name jupyterR \ --restart always \ -m 60416M --memory-swap -1 \ -c 1024 \ --cpus 16 \ -v /home/gene/upload:/home/jovyan/upload \ -v /home/gene/zl_liu/jupytera/before-notebook.d:/usr/local/bin/before-notebook.d \ -v /home/gene/zl_liu/jupytera/dev:/home/jovyan/dev \ -v /home/gene/zl_liu/jupytera/etc:/home/jovyan/etc \ -v /home/gene/zl_liu/jupytera/log:/home/jovyan/log \ -v /home/gene/zl_liu/jupytera:/home/jovyan/old \ jupyter/datascience-notebook:r-4.1.2 \ start-notebook.sh --NotebookApp.token='***'
|
1 2 3 4 5 6
| # 主机上 mkdir ~/upload/zl_liu chmod 777 ~/upload/zl_liu/
# docker里 cp -r /opt ~/upload/zl_liu/
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| #!/bin/sh docker run -d -p 57002:8888 --name jupyterR \ --restart always \ -m 60416M --memory-swap -1 \ -c 1024 \ --cpus 16 \ -v /home/gene/upload:/home/jovyan/upload \ -v /home/gene/zl_liu/jupytera/before-notebook.d:/usr/local/bin/before-notebook.d \ -v /home/gene/zl_liu/jupytera/dev:/home/jovyan/dev \ -v /home/gene/zl_liu/jupytera/etc:/home/jovyan/etc \ -v /home/gene/zl_liu/jupytera/log:/home/jovyan/log \ -v /home/gene/upload/zl_liu/opt:/opt \ jupyter/datascience-notebook:r-4.1.2 \ start-notebook.sh --NotebookApp.token='***'
|