背景
- 搜了許多,都是較爲陳舊的,目前docker的mac桌面版支持很快速的設置,不用找任何幫助
前提
- 假設你是想使用docker鏡像,來避免python環境的複雜,節約時間的,來吧
- 由於我最近開始研究ai,因此技術背景是ai
- docker pull ufoym/deepo:all-py36-jupyter-cpu
- 4個多G
申請pycharm專業版
- 0.0.0.0 account.jetbrains.com ,添加到hosts
- pycharm,嗯,Activate code
- G91XMO9AVI-eyJsaWNlbnNlSWQiOiJHOTFYTU85QVZJIiwibGljZW5zZWVOYW1lIjoic29uZyB3YW5nIiwiYXNzaWduZWVOYW1lIjoiIiwiYXNzaWduZWVFbWFpbCI6IiIsImxpY2Vuc2VSZXN0cmljdGlvbiI6IkZvciBlZHVjYXRpb25hbCB1c2Ugb25seSIsImNoZWNrQ29uY3VycmVudFVzZSI6ZmFsc2UsInByb2R1Y3RzIjpbeyJjb2RlIjoiSUkiLCJwYWlkVXBUbyI6IjIwMTktMDMtMDYifSx7ImNvZGUiOiJSUzAiLCJwYWlkVXBUbyI6IjIwMTktMDMtMDYifSx7ImNvZGUiOiJXUyIsInBhaWRVcFRvIjoiMjAxOS0wMy0wNiJ9LHsiY29kZSI6IlJEIiwicGFpZFVwVG8iOiIyMDE5LTAzLTA2In0seyJjb2RlIjoiUkMiLCJwYWlkVXBUbyI6IjIwMTktMDMtMDYifSx7ImNvZGUiOiJEQyIsInBhaWRVcFRvIjoiMjAxOS0wMy0wNiJ9LHsiY29kZSI6IkRCIiwicGFpZFVwVG8iOiIyMDE5LTAzLTA2In0seyJjb2RlIjoiUk0iLCJwYWlkVXBUbyI6IjIwMTktMDMtMDYifSx7ImNvZGUiOiJETSIsInBhaWRVcFRvIjoiMjAxOS0wMy0wNiJ9LHsiY29kZSI6IkFDIiwicGFpZFVwVG8iOiIyMDE5LTAzLTA2In0seyJjb2RlIjoiRFBOIiwicGFpZFVwVG8iOiIyMDE5LTAzLTA2In0seyJjb2RlIjoiR08iLCJwYWlkVXBUbyI6IjIwMTktMDMtMDYifSx7ImN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docker的remote調試,ce版本沒有
- 只須要進入project進行設置,以下圖
- 能夠採用另一種方法:社區版在本地作實驗,和學習,足夠了
- docker鏡像採用有jupyterbook的images,全搞定
- docker pull ufoym/deepo:all-py36-jupyter-cpu
- 或者
- 折扣申請
- https://www.jetbrains.com/pyc...
- 也能夠採用的最簡便的:jupyter book
- 進入pycharm,引用numpy,如圖,remote包ok啦
jupyter notebook(使用docker)
ZBMAC-C02N753CG:test jiaohuifeng$ ./jupyter.sh
[I 08:26:23.100 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret
[W 08:26:23.537 NotebookApp] All authentication is disabled. Anyone who can connect to this server will be able to run code.
[I 08:26:23.552 NotebookApp] Serving notebooks from local directory: /root
[I 08:26:23.552 NotebookApp] 0 active kernels
[I 08:26:23.552 NotebookApp] The Jupyter Notebook is running at:
[I 08:26:23.553 NotebookApp] http://0.0.0.0:8888/
[I 08:26:23.553 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
jupyter.sh
docker run -it -v /Users/jiaohuifeng/test:/sdata -p 8888:8888 --ipc=host ufoym/deepo:all-py36-jupyter-cpu jupyter notebook --no-browser --ip=0.0.0.0 --allow-root --NotebookApp.token= --notebook-dir='/root'