通过容器构建
#创建python3.6
conda install -y python=3.6
#创建tensorflow1.15
conda install -y tensorflow-gpu=1.15
python -m pip install -i https://pypi.douban.com/simple/ jupyter
python -m pip install -i https://pypi.douban.com/simple/ ipywidgets
jupyter nbextension enable --py widgetsnbextension
python -m pip install -i https://pypi.douban.com/simple/ jupyterlab
jupyter serverextension enable --py jupyterlab
构建
#获取容器id
sudo docker ps -a |grep "cuda"
#提交镜像到本地镜像
sudo docker commit 4cd66f64b697 xxx/public_image/cuda_miniconda_py_tensorflow/cuda_10.0_miniconda_py3.6_tensorflow1.15:v1
#镜像打个标签
sudo docker tag 1877820c0e31 xxx/public_image/cuda_miniconda/cuda_10.0_miniconda_py3.6_tensorflow1.15:v1
#上传到harbor
sudo docker push xxx/public_image/cuda_miniconda/cuda_10.0_miniconda_py3.6_tensorflow1.15:v1
通过dockerfile方式
FROM xxx/public_image/c

本文介绍如何使用conda和pip安装Python 3.6及TensorFlow 1.15,并通过Dockerfile构建包含CUDA支持的Miniconda环境镜像。该镜像还集成了Jupyter和JupyterLab等常用工具。
最低0.47元/天 解锁文章
323

被折叠的 条评论
为什么被折叠?



