autocut
autocut copied to clipboard
docker gpu 运行提示 PyTorch和TorchAudio 版本不一致
今日在新电脑上部署 Docker GPU 版本,运行 autocut -t video.mp4
提示
RuntimeError: Detected that PyTorch and TorchAudio were compiled with different CUDA versions. PyTorch has CUDA version 11.6 whereas TorchAudio has CUDA version 11.7. Please install the TorchAudio version that matches your PyTorch version.
尝试使用 docker system prune --all
删除缓存,重新安装 无法解决。
应当如何修复这个问题呢?之前在旧电脑上安装是正常的。
可以在docker中升级torch到CUDA 11.7版本,或者降级TorchAudio 到11.6版本。 可参考Pytorch官网:https://pytorch.org/get-started/locally/
万分谢谢。
在 Docker 中运行 conda install pytorch torchvision torchaudio pytorch-cuda=11.7 -c pytorch -c nvidia
解决
不过只要重启容器,就丢失了.
只能 commit 成新的镜像
我测试了下,没能复现你的问题。 用docker build重新构建包,然后试试看。
对于重启容器丢失问题,你可以不加 --rm
,然后指定名称 --name xxx
。后续再运行时,用docker exec。