# tensorflow-gpu镜像启动
sudo nvidia-docker run -it -v /home/huatec/Desktop/project:/home/huatec/Desktop/project -p 8888:8888 -p 1000:22 tensorflow/tensorflow:latest-gpu
安装jupyterlab
apt-get update
pip install jupyterlab 或者直接安装Anaconda
更改 Jupyter 的默认启动目录 Overwrite /Users/raxxie/.jupyter/jupyter_notebook_config.py with default config? [y/N]”,即“用默认配置文件覆盖此路径下的文件吗?”,如果按“y”,则完成覆盖,那么之前所做的修改都将失效;如果只是为了查询路径,那么一定要输入“N”。
jupyter notebook --generate-config
启动jupyter
jupyter notebook
报错
Running as root is not recommended. Use --allow-root to bypass.
解决办法
找到#c.NotebookApp.allow_root = False
改成 c.NotebookApp.allow_root = True
外部浏览器无法正常访问
jupyter-notebook --allow-root --ip=0.0.0.0 --port=8888
配置密码访问:
先执行python进入python环境,执行
from notebook.auth import passwd
passwd()
输入自己设定的密码,然后会输出