(pytorch)使用docker尝试运行文章代码记录

该文章由 AnonymousUser在 2021年09月13日 20:23:00发布

镜像下载地址

https://hub.docker.com/r/pytorch/pytorch/tags?page=1&ordering=last_updated

拉取对应的镜像文件

docker pull pytorch/pytorch:1.7.1-cuda11.0-cudnn8-runtime

拉取完成之后查看本地镜像情况

sudo docker images -a

  • 运行对应的镜像

sudo docker run --gpus all -td --name=jy_pytorch -v /media/jy/Elements/githubCodeCollection:/code pytorch/pytorch:1.7.1-cuda11.0-cudnn8-runtime bash

-td 以后台挂起的形式运行 -v 在本地以数据卷的形式作持久化操作

  • 进入这个容器中

sudo docker exec -it jy_pytorch bash

在docker中的一些配置操作过程记录 - 安装git

apt-get install git -y

  • 升级pip

pip3 install --upgrade pip



共0条评论


    暂无评论


Leave A Comment