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

安装完成

相关推荐
高洁0112 小时前
数字孪生的冷启动#数字孪生 #人工智能 #大模型 #世界模型
深度学习·机器学习·transformer·迁移学习·tornado
木子欢儿15 小时前
Ubuntu 26.04 LTS 安装Python 3.12
linux·运维·服务器·python·ubuntu
2601_967979122 天前
Ubuntu部署tensorflow(CPU/GPU)方法
ubuntu·tensorflow·cpu·gpu·配置
Rabitebla2 天前
【Linux】文件篇(五):手撕简易 FILE——模拟实现 C 标准 I/O 缓冲机制
linux·服务器·c语言·笔记·学习·ubuntu
高洁013 天前
数字孪生与计算机视觉:让机器看懂现场
人工智能·python·机器学习·transformer·迁移学习
β添砖java3 天前
NLP自然语言处理4:迁移学习:fasttext工具,训练词向量、词向量迁移、迁移学习概念、NLP中常用预训练模型、transformer库使用、迁移学习实践
自然语言处理·transformer·迁移学习
高洁015 天前
世界模型的因果内核:从预测表象到理解机制
人工智能·python·深度学习·transformer·迁移学习
Soari6 天前
大语言模型LLM综述解读:从预训练到评测,建立理解 LLM 的技术地图
transformer·大语言模型·tsn·rlhf·指令微调
β添砖java7 天前
Transformer大白话学习笔记
笔记·学习·transformer
Eloudy9 天前
从 DeepSeek-V1 到 DeepSeek-V2:一次从“堆稠密参数”到“稀疏计算+压缩缓存”的架构转向
gpt·llm·transformer