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 ...]
如果您能告訴我如何更改版本,我將不勝感激。
uj5u.com熱心網友回復:
您的第二個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>
看起來至少還有一個人有類似的問題。不幸的是,該專案沒有得到積極維護,因此在嘗試使其與最新硬體一起作業時很難獲得任何形式的支持。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/516653.html
標籤:码头工人火炬英伟达
