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

相关推荐
198******126341 小时前
2026深度解读:Work Agent长程任务的技术机制与落地能力
人工智能
老金带你玩AI1 小时前
别只让AI解释,让它做个你能看懂的东西
人工智能
iffy12 小时前
Deepseek hardness 桌面版 + ollama
人工智能
Xiaofeng36932 小时前
知漫剧入门科普:一站式工作台一句话生成漫剧
人工智能
“AI国潮设计-小江”2 小时前
《Python+SDXL实战:用ControlNet精准控制“英歌舞翻糖吐司”构图,附批量生成脚本》
开发语言·人工智能·python·prompt·aigc
MobotStone2 小时前
万物皆插件:DeepSeek Harness 底层揭秘,脚手架如何蜕变为产品
人工智能
youdexiang3 小时前
Android录音软件时间关键词检索功能分析
java·人工智能
WUYOUGYLU3 小时前
大模型时代:人与智能的共同进化
人工智能
netkiller-BG7NYT3 小时前
基于图像识别的人工智能中医望诊方案
人工智能·百度
W***25923 小时前
Work Agent深度解读:AI长程任务的执行机制与落地形态
人工智能