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

安装完成

相关推荐
下一页盛夏花开18 分钟前
ubuntu 20中安装QT以后出现红色空心断点
linux·运维·ubuntu
拾贰_C6 小时前
【OpenClaw | openai | QQ】 配置QQ qot机器人
运维·人工智能·ubuntu·面试·prompt
郝亚军6 小时前
ubuntu 22.04如何安装libmodbus
运维·服务器·ubuntu
AI木马人7 小时前
2.人工智能实战:大模型接口并发低、GPU利用率上不去?基于 vLLM 重构推理服务的完整工程方案
人工智能·transformer·vllm
Soari7 小时前
三菱伺服放大器MR-JET-10G配置教程
mr·伺服驱动器·mr-jet
乌恩大侠7 小时前
【AI-RAN】在空ubuntu服务器安装环境和生成TV,高达430G文件
服务器·人工智能·ubuntu·fpga开发·o-ru
Hello.Reader8 小时前
Ubuntu 上正确安装 Kali 虚拟机、Docker 与 kail 工具指南
linux·ubuntu·docker
一袋米扛几楼988 小时前
【报错问题】解决 Vercel 部署报错:Express 类型失效与 TypeScript 2349/2339/2769 错误排查
ubuntu·typescript·express
小超同学你好8 小时前
Transformer 30. MoCo:用「动量编码器 + 队列字典」把对比学习做成可扩展的“字典查找”
深度学习·学习·transformer
MIXLLRED9 小时前
Ubuntu22.04 + ROS2 Humble + RealSense D435i 部署VINS-Fusion视觉惯性SLAM
ubuntu·slam·d435i·ros2·humble·vins