环境Ubuntu 25.04,RTX4090,CUDA12.8下的Mr.DETR、Detectron2、detrex、Transformer安装

1、安装环境

Ubuntu:25.04

GPU:RTX 4090

gcc:14

CUDA:12.8

torch:2.4

python安装

复制代码
conda create -n Mr.DETR python=3.8 -y
conda activate Mr.DETR

安装pytorch

复制代码
pip install torch==2.4.0 torchvision==0.19.0 torchaudio==2.4.0 --index-url https://download.pytorch.org/whl/cu124

2、安装Mr.DETR和detectron2

复制代码
git clone https://github.com/Visual-AI/Mr.DETR.git # 下载的文件中detectron2是空的
git submodule init 
git submodule update # 对空的detectron2进行更新
pip install -e detectron2

会报错

参考链接"error: exception specification is incompatible" for cospi/sinpi/cospif/sinpif with glibc-2.41需要cuda中路径为

复制代码
/usr/local/cuda-12.8/include/crt/math_functions.h

文件进行修改,具体将其中的2556、2579、2601以及2623等四处行由下一图修改为下二图,在其后添加noexcept(true)

detectron2即安装完成

3、安装requirements.txt

复制代码
pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/

4、安装detrex

复制代码
pip install -e .

报以下错误

安装pip23.1

复制代码
pip install pip==23.1

继续安装

复制代码
pip install -e .

安装完成

相关推荐
warm3snow2 天前
AI 核心技能系列:12 篇文章带你系统掌握大模型岗位必备技能
ai·transformer·agent·skill·mcp·fine-tunning
homelook2 天前
Transformer与电池管理系统(BMS)的结合是当前 智能电池管理 的前沿研究方向
人工智能·深度学习·transformer
欧云服务器2 天前
怎么让脚本命令可以同时在centos、debian、ubuntu执行?
ubuntu·centos·debian
智渊AI2 天前
Ubuntu 20.04/22.04 下通过 NVM 安装 Node.js 22(LTS 稳定版)
ubuntu·node.js·vim
kebijuelun3 天前
Learning Personalized Agents from Human Feedback:用人类反馈训练可持续个性化智能体
人工智能·深度学习·算法·transformer
The️3 天前
Linux驱动开发之Read_Write函数
linux·运维·服务器·驱动开发·ubuntu·交互
再战300年3 天前
Samba在ubuntu上安装部署
linux·运维·ubuntu
qwfys2003 天前
How to install golang 1.26.0 to Ubuntu 24.04
ubuntu·golang·install
木尧大兄弟3 天前
Ubuntu 系统安装 OpenClaw 并接入飞书记录
linux·ubuntu·飞书·openclaw
homelook3 天前
Transformer架构,这是现代自然语言处理和人工智能领域的核心技术。
人工智能·自然语言处理·transformer