环境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 .

安装完成

相关推荐
wypywyp1 天前
8. ubuntu 虚拟机 linux 服务器 TCP/IP 概念辨析
linux·服务器·ubuntu
阿蒙Amon1 天前
TypeScript学习-第10章:模块与命名空间
学习·ubuntu·typescript
chian-ocean1 天前
量化加速实战:基于 `ops-transformer` 的 INT8 Transformer 推理
人工智能·深度学习·transformer
杜子不疼.1 天前
CANN_Transformer加速库ascend-transformer-boost的大模型推理性能优化实践
深度学习·性能优化·transformer
No8g攻城狮1 天前
【Linux】Windows11 安装 WSL2 并运行 Ubuntu 22.04 详细操作步骤
linux·运维·ubuntu
renhongxia11 天前
如何基于知识图谱进行故障原因、事故原因推理,需要用到哪些算法
人工智能·深度学习·算法·机器学习·自然语言处理·transformer·知识图谱
深鱼~1 天前
ops-transformer算子库:解锁昇腾大模型加速的关键
人工智能·深度学习·transformer·cann
禁默1 天前
不仅是 FlashAttention:揭秘 CANN ops-transformer 如何重构大模型推理
深度学习·重构·aigc·transformer·cann
笔画人生1 天前
进阶解读:`ops-transformer` 内部实现与性能调优实战
人工智能·深度学习·transformer
种时光的人1 天前
CANN仓库核心解读:ascend-transformer-boost解锁AIGC大模型加速新范式
深度学习·aigc·transformer