简体   繁体   English

Sagemaker Studio Lab GPU 不能与 pytorch 一起使用

[英]Sagemaker Studio Lab GPU not working with pytorch

I can't get the GPU to work even though i chose the GPU option with 4 hours at the start.我无法让 GPU 工作,即使我在开始时选择了 GPU 选项 4 小时。 Is there something to do in order to activate it?有什么办法可以激活它吗?

在此处输入图像描述

edit:编辑:

I installed pytorch with cuda: %conda install pytorch torchvision torchaudio cudatoolkit=11.4 -c pytorch我用 cuda 安装了 pytorch: %conda install pytorch torchvision torchaudio cudatoolkit=11.4 -c pytorch

Could you try building a custom environment via the YAML file option, using something like this (below is just an example file that works for me, you can add remove packages specific to your use case)你可以尝试通过 YAML 文件选项构建自定义环境,使用类似这样的东西(下面只是一个适用于我的示例文件,你可以添加特定于你的用例的删除包)

name: torch
channels:
    - pytorch
dependencies:
  - python=3.9
  - pip
  - pip:
    - ipywidgets
  - conda
  - conda:
    - ipykernel
    - pytorch
    - torchvision
    - torchaudio
    - torchserve
    - cudatoolkit=11.3
    - sklearn

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM