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

相关推荐
漂流瓶jz2 小时前
【AI】大模型本地部署与量化:Ollama、transformers、llama.cpp实践
人工智能·llm·ai编程
飞哥数智坊4 小时前
AI时代,我们到底该学什么、用什么,为什么还没提效?
人工智能
飞哥数智坊4 小时前
GPT 做架构,国内模型写代码:这条 AI 开发路线能跑通吗?
人工智能·ai编程
AI_AGENT_DEV_AI5 小时前
AI 智能体的开发与上线
人工智能
VL——MOESR5 小时前
【具身智能】VLA论文阅读随笔
论文阅读·人工智能·机器学习·具身智能·vla
OCR_133716212755 小时前
从模板匹配到AI泛化识别:文本抽取如何重构护照阅读器落地生态
人工智能·重构
大唐荣华5 小时前
从OpenAI关停Sora看世界模型、AI视频与国内具身智能赛道路线分化
人工智能·openai·sora·内容生成
DevOps老兵5 小时前
AI Infra实战02:GPU监控实战,用DCGM+Prometheus+Grafana看清每一张卡
人工智能·grafana·prometheus·ai infra·gpu监控·dcgm
旧日之血_Hayter5 小时前
Antigravity 工作流的实践记录
人工智能
dozenyaoyida5 小时前
AI与大模型新闻日报 | 2026-09-01
人工智能·ai·大模型·新闻