ubuntu 或centos 使用Docker搭建anaconda+python基本环境
2024-09-06 06:41:43
ubuntu 16 使用Docker安装anaconda
ubuntu docker 安装
centos docker 安装
搜索可用镜像
docker search anaconda
拉取你中意的镜像
docker pull continuumio/anaconda3
查看已有镜像
docker images
启动该镜像并且运行bash命令
docker run -t -i continuumio/anaconda3 /bin/bash
查看python版本
python
查看已安装的库
pip list
退出容器
exit
删除images,通过image的id来指定删除谁
docker rmi <image id>
查看已有容器
docker container ls -all
容器重命名
docker rename 原名字 新名字
在该容器内安装jupyter notebook
conda install ** 使用 conda 安装 库 | 卸载:conda uninstall pytorch conda install jupyter
输入 修改 配置,因为服务器本身已经安装了 jupyter ,效果如下
jupyter notebook --generate-config
后来查了其它博客了解到,jupyter 的启动可以指定配置文件,配置文件在任意位置都可以,基本的启动命令如下:
jupyter notebook --config=root_jupyter_config.py
此处为了不覆盖服务器默认的jupyter 配置文件,就自己新建了root_jupyter_config.py,在里面进行配置,具体配置如下:
c.NotebookApp.ip='*' # 指定 可访问 IP 或者 使用 * 则可以用任意 IP
c.NotebookApp.open_browser = False # 关闭自动打开浏览器
c.NotebookApp.port = 8888 # 端口随意指定,然后在阿里云开对应端口的防火墙即可
c.NotebookApp.password = u'sha1:d8334*******' # 复制前一步生成的密钥
c.NotebookApp.allow_remote_access = True
c.NotebookApp.notebook_dir = '/usr/local/mypro/pythonpro' #指定默认打开的文件夹
备注:
其它jupyter 详细配置过程请移步:
远程访问阿里云服务器jupyter
原文链接:https://blog.csdn.net/sinat_28442665/article/details/85724080
最新文章
- golang struct扩展函数参数命名警告
- 云巴:基于MQTT协议的实时通信编程模型
- Xcode 7中http通信出现如下错误:Application Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure. Temporary exceptions can be configured via your app&#39;s Info.plist file.
- 异常 java.util.regex.PatternSyntaxException:
- Error generating Swagger server (Python Flask) from Swagger editor
- 使用ASP.NET web API创建REST服务(二)
- Web Server (IIS) Administration Cmdlets in Windows PowerShell
- jquery.mmenu
- nide.js(二)文件I/O
- JS中获取页面单选框radio和复选框checkbox中当前选中的值
- FusionCharts使用问题及解决方法(五)-FusionCharts常见问题大全
- ThoughtWorks 2017技术雷达
- Python读取文件内容与存储
- influence maximization 第二弹
- 常用的一些cmd命令
- Troubleshooting Scheduler Autotask Issues (Doc ID 1561498.1)
- 1-STM32物联网开发WIFI(ESP8266)+GPRS(Air202)系统方案升级篇(方案总揽)
- AttributeError: &#39;WebDriver&#39; object has no attribute &#39;switchTo&#39;
- What makes for effective detection proposals? 论文解析
- EOS开发基础之二:使用cleos命令行客户端操作EOS(钱包wallet基础操作)