You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何在NVIDIA GeForce RTX 3090上适配22.05版本运行chenrocks/uniter?

解决RTX 3090上运行chenrocks/uniter的容器版本问题

问题根源

原chenrocks/uniter镜像基于NVIDIA 19.05版本容器,该版本仅支持Turing及更早架构的GPU,而RTX 3090属于Ampere架构,因此触发不兼容报错。

第二个命令的参数错误原因

你错误地将镜像名nvcr.io/nvidia/pytorch:22.05-py3插入到docker run选项中间,且末尾多余添加了chenrocks/uniter,导致Docker将--mount等运行选项误判为容器启动命令的参数,触发exec: --: invalid option错误。

正确操作步骤

1. 启动兼容RTX3090的容器

使用NVIDIA 22.05版本PyTorch容器(支持CUDA 11.7,适配Ampere架构),并严格遵循docker run参数顺序:

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 \
    nvcr.io/nvidia/pytorch:22.05-py3

注意:镜像名必须放在所有docker run选项的最后,无特殊启动命令时默认进入bash终端。

2. 在容器内配置uniter运行环境

进入容器后,需手动安装chenrocks/uniter所需依赖(原镜像已预装,现需自行配置):

  1. 容器自带PyTorch 1.12.0+cu117,适配RTX3090,无需额外替换
  2. 安装项目依赖:
# 安装requirements.txt中声明的依赖
pip install -r requirements.txt
# 若出现版本冲突,可根据CUDA 11.7调整对应包的版本号

3. 运行uniter脚本

环境配置完成后,即可执行原chenrocks/uniter的训练或推理命令,示例如下:

# 根据你的任务需求调整参数
python train.py --txt_db /txt --img_db /img --pretrain /pretrain --output /storage

内容的提问来源于stack exchange,提问作者유은석

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.16 04:05:21