docker 安装jupyter
时间: 2023-10-07 10:10:04 浏览: 151
要在Docker中安装Jupyter Notebook,你可以按照以下步骤进行操作:
1. 第一步是拉取镜像。使用以下命令拉取Miniconda3镜像:
```
docker pull continuumio/miniconda3
```
2. 接下来,启动一个容器并运行Jupyter Notebook。使用以下命令:
```
docker run -id -p XXXX-XXXX:XXXX-XXXX -p XXXX:xxxx --gpus all --name XXXX --restart always -v /home/XXXX:/data --user root continuumio/miniconda3:latest
```
请将XXXX-XXXX和XXXX替换为你想要使用的端口号。这将创建一个名为XXXX的容器,并将主机的目录/home/XXXX挂载到容器的/data目录下。
3. 最后,安装Jupyter Notebook的插件。首先,停止Jupyter Notebook的运行。然后使用以下命令安装插件:
```
pip install jupyter_contrib_nbextensions
```
然后,配置nbextension:
```
jupyter contrib nbextension install --user --skip-running-check
```
最后,重新启动Jupyter Notebook:
```
jupyter notebook
```
现在,你应该可以通过浏览器访问Jupyter Notebook了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* *3* [docker容器安装jupyter notebook(安装、配置、修改全过程)](https://blog.csdn.net/buluxianfeng/article/details/123478620)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 100%"]
[ .reference_list ]
阅读全文