docker - 使用 Pytorch-cuda 作为 Docker 的基础镜像
问题描述
我需要使用带有 cuda gpu 访问权限的 Pytorch。我使用 FROM "pytorch/pytorch:1.9.0-cuda10.2-cudnn7-runtime" 作为我的基础镜像。是否还使用此命令安装了必要的 python 版本?
解决方案
从 DockerHub 你可以看到这些类型的图像是如何构建的: https ://hub.docker.com/layers/pytorch/pytorch/1.9.0-cuda10.2-cudnn7-runtime/images/sha256-5dc11a9036bcb5b7950f4f8a43974057559278fa4bd87513cafd477fef9eb57a?con探索
在那里你可以看到 conda 已安装。我建议在您正在使用的 DockerFile 中使用随附的 conda。
推荐阅读
- ruby-on-rails - YAML.load_file 无法正确读取 ENV 变量
- javascript - 在类的构造函数之外写一个字段是什么意思?
- python - 如何使用 Python Selenium 点击第一个 Yahoo 搜索结果
- javascript - 如何创建一个在 2 个事件之间跳过排放的 observable
- javascript - Django-HTML:我如何允许用户添加额外的输入字段(确保它们不是必需的)?类似于 + 按钮的东西
- c++ - 删除导致核心转储,为什么?
- python - Selenium 在抓取网页后返回空元素
- python - 生成通过树的所有可能路径
- c# - 可以使用 DateTime.Now 的 Ticks 生成重复的唯一标识符吗?
- django - 使用 adminLTE 3.0.5 模板时,Ajax 下拉菜单在 django 中不起作用