Ubuntu22.4部署大模型前置安装

真机环境安装

安装Pytorch等依赖

将一下内容放入到requirements.txt

torch==2.4.1

torchaudio==2.4.1

packaging

jinja2

openai-whisper

jsonlines

pandas

validators

sty

transformers

librosa

accelerate

aiohttp

colorama

omegaconf==2.3.0

sox

six==1.16.0

hyperpyyaml

conformer==0.3.2

diffusers

pillow

sentencepiece

easydict

fire

ujson

cairosvg

immutabledict

rich

wget

gdown

datasets

torchdyn==1.0.6

huggingface_hub

loguru

decord

blobfile

timm

sacrebleu==1.5.1

soundfile

tqdm

然后

复制代码
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple

安装cuda12.1

Ubuntu22.4部署及更新cuda11.8与cuda12.1-CSDN博客

安装flash_attn

下载flash_attn依赖(这一步很重要,要不然代码程序无法执行)

python 复制代码
pip install flash_attn

如果一直无法安装,可直接下载安装文件,然后再安装

python 复制代码
cd /opt/workspace/
wget https://github.moeyy.xyz/https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/flash_attn-2.7.4.post1+cu12torch2.4cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
pip install flash_attn-2.7.4.post1+cu12torch2.4cxx11abiFALSE-cp310-cp310-linux_x86_64.whl

以上下载地址可参考(Linux):Releases · Dao-AILab/flash-attention · GitHub

windows系统参考:Releases · kingbri1/flash-attention · GitHub

相关推荐
岛雨QA2 分钟前
Skill学习指南🧑‍💻
人工智能·agent·ai编程
zh路西法2 分钟前
【宇树机器人强化学习】(七):复杂地形的生成与训练
python·深度学习·机器学习·机器人
波动几何6 分钟前
从人性到无名:一条向内的觉悟之路
人工智能
EllenLiu17 分钟前
架构演进与性能压榨:在金融 RAG 中引入条款森林 (FoC)
人工智能·架构
IT_陈寒32 分钟前
深入理解JavaScript:核心原理与最佳实践
前端·人工智能·后端
Presto38 分钟前
AI 时代 .env 文件不再安全——我试图找到替代方案,然后撞上了一堵墙
人工智能
IT WorryFree44 分钟前
OpenClaw-Medical-Skills 仓库介绍
人工智能·skill·openclaw
多年小白1 小时前
今日AI科技简报 | 2026年3月19日
人工智能·科技·ai编程
逄逄不是胖胖1 小时前
《动手学深度学习》-69预训练bert数据集实现
人工智能·深度学习·bert
IT_陈寒1 小时前
Python开发者的效率革命:这5个技巧让你的代码提速50%!
前端·人工智能·后端