《DeepSeek Janus Pro 7B :人工智能大模型的安装指南》
以下是 Janus Pro 7B 的安装指南,结合官方文档与社区实践整理而成。安装前请确保满足硬件和软件环境要求,并参考以下步骤操作:
一、环境要求
- 操作系统
- 支持 Linux 或 Windows,推荐 Ubuntu 20.04+。
- Python 版本
- Python ≥ 3.8(推荐 3.10)。
- CUDA 与 GPU
- CUDA ≥ 11.7(需与 PyTorch 版本匹配)。
- GPU 显存 ≥ 16GB(运行 Janus-Pro-7B 需 ≥ 24GB)。
- 存储空间
- 至少 30GB 可用空间。
二、安装步骤
1. 克隆代码库与创建虚拟环境
# 克隆代码库
git clone https://github.com/deepseek-ai/Janus.git
cd Janus
# 创建并激活虚拟环境(推荐使用 Conda)
conda create -n janus python=3.10 -y
conda activate janus
2. 安装依赖库
# 安装指定版本的 PyTorch 和 CUDA
pip install torch==2.0.1+cu117 --index-url https://download.pytorch.org/whl/cu117
# 安装项目依赖
pip install -r requirements.txt
# 安装 Gradio 扩展(用于本地演示)
pip