docker run --gpus '"'device=$CUDA_VISIBLE_DEVICES'"' --ipc=host --rm -it \
--mount src=$(pwd),dst=/src,type=bind \
--mount src=$OUTPUT,dst=/storage,type=bind \
--mount src=$PRETRAIN_DIR,dst=/pretrain,type=bind,readonly \
--mount src=$TXT_DB,dst=/txt,type=bind,readonly \
--mount src=$IMG_DIR,dst=/img,type=bind,readonly \
-e NVIDIA_VISIBLE_DEVICES=$CUDA_VISIBLE_DEVICES \
-w /src chenrocks/uniter
当我运行此文件时,它会打印错误
NVIDIA Release 19.05 (build 6411784) PyTorch Version 1.1.0a0+828a6a3
...
WARNING: Detected NVIDIA NVIDIA GeForce RTX 3090 GPU, which is not yet supported in this version of the container
ERROR: No supported GPU(s) detected to run this container
它不适合我的 NVIDIA GeForce RTX 3090 GPU 所以我想将版本更改为22.05 但是当我运行这个时,
docker run --gpus '"'device=$CUDA_VISIBLE_DEVICES'"' --ipc=host --rm
-it nvcr.io/nvidia/pytorch:22.05-py3 \
--mount src=$(pwd),dst=/src,type=bind \
--mount src=$OUTPUT,dst=/storage,type=bind \
--mount src=$PRETRAIN_DIR,dst=/pretrain,type=bind,readonly \
--mount src=$TXT_DB,dst=/txt,type=bind,readonly \
--mount src=$IMG_DIR,dst=/img,type=bind,readonly \
-e NVIDIA_VISIBLE_DEVICES=$CUDA_VISIBLE_DEVICES \
-w /src chenrocks/uniter
打印错误
/opt/nvidia/nvidia_entrypoint.sh: line 49: exec: --: invalid option
exec: usage: exec [-cl] [-a name] [command [arguments ...]] [redirection ...]
如果您能告诉我如何更改版本,我将非常感激。
您的第二个
docker run
命令指定 2 个图像:
docker run ... nvcr.io/nvidia/pytorch:22.05-py3 chenrocks/uniter
您只能通过一项。
docker run
命令的一般格式:
$ docker run [OPTIONS] IMAGE [COMMAND] [ARG...]
更新
但是如果 docker 镜像的 nvidia/pytorch 版本不适合我的 GPU,我可以不使用该 docker 镜像吗?或者有什么我可以做的吗?
Dockerfile
来构建自定义 docker 镜像。
类似这样的:
git clone https://github.com/ChenRocks/UNITER.git
cd UNITER
# replace the first line of the Dockerfile with:
# FROM nvcr.io/nvidia/pytorch:22.05-py3
docker build .
# ...
# Successfully built <image_id>
然后只需编辑您的
docker run
命令即可使用您的自定义构建图像:
docker run ... <image_id>
看起来至少还有一个人有类似的问题。不幸的是,该项目没有得到积极维护,因此在尝试使其与最新硬件一起工作时很难获得任何类型的支持。