首先更新apt到最新並下載ipython3以及相關套件 sudo apt update sudo apt install python3-pip sudo apt install notebook 接著進入ipython去產生SHA密碼 ipython import IPython IPython.lib.passrd() 輸入密碼會產生sha密碼 接著產生swarm cluster sudo docker service create --name 'cluster名稱' -d -p 8888:8888 -e GRANT_SUDO=yes jupyter/base-notebook start-notebook.sh --NotebookApp.password='SHA密碼' sudo docker service scale 'cluster名稱'=1 sudo docker exec --user root -it 'cluster名稱' bash NFS 共享Storage設置 sudo apt install nfs-kernel-server (manager node) sudo apt install nfs-common (worker node) sudo vim /etc/exports sudo mkdir -p /mount/nfs_volume /mount/nfs_volume 192.168.80.0/24(rw,sync,no_root_sqush) sudo nfs-kernel-servel restart mount -t nfs 192.168.80.129:/mount/nfs_volume /mount/nfs_volume 最後暫定指令,指令必須連結至jupyter的預設目錄 sudo docker service create --name jup-base --mount 'type=volume,src=nfs_volume,dst=/home/jovyan/work,volume-driver=local,volume-nocopy=true,volume-op
留言
張貼留言