首页 > 解决方案 > 使用 Pytorch-cuda 作为 Docker 的基础镜像

问题描述

我需要使用带有 cuda gpu 访问权限的 Pytorch。我使用 FROM "pytorch/pytorch:1.9.0-cuda10.2-cudnn7-runtime" 作为我的基础镜像。是否还使用此命令安装了必要的 python 版本?

标签: dockerpytorch

解决方案


从 DockerHub 你可以看到这些类型的图像是如何构建的: https ://hub.docker.com/layers/pytorch/pytorch/1.9.0-cuda10.2-cudnn7-runtime/images/sha256-5dc11a9036bcb5b7950f4f8a43974057559278fa4bd87513cafd477fef9eb57a?con探索

在那里你可以看到 conda 已安装。我建议在您正在使用的 DockerFile 中使用随附的 conda。


推荐阅读