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

安装完成

相关推荐
shangjian0076 小时前
AI-大语言模型LLM-Transformer架构3-嵌入和位置编码
人工智能·语言模型·transformer
郝亚军6 小时前
如何在windows11和Ubuntu linux之间互传文件
linux·运维·ubuntu
程序员 _孜然6 小时前
openkylin、ubuntu等系统实现串口自动登录
linux·运维·ubuntu
hello_fracong7 小时前
nvm管理Angular多版本(Ubuntu系统)
ubuntu·angular.js·nvm
一只自律的鸡8 小时前
【Linux驱动】Ubuntu基础 下篇
linux·ubuntu
gsgbgxp8 小时前
WSL迁移至非系统盘
深度学习·ubuntu
淬炼之火8 小时前
基于Docker Desktop 和 Ubuntu 在 Windows上部署轻量化大模型(Qwen-LLM)
笔记·ubuntu·docker·语言模型·容器
shangjian0079 小时前
AI-大语言模型LLM-Transformer架构1-整体介绍
人工智能·语言模型·transformer
shangjian0079 小时前
AI-大语言模型LLM-Transformer架构2-自注意力
人工智能·语言模型·transformer
迷路爸爸1809 小时前
无sudo权限远程连接Ubuntu服务器安装TeX Live实操记录(适配VS Code+LaTeX Workshop,含路径选择与卸载方案)
java·服务器·ubuntu·latex