mirror of
https://github.com/deepseek-ai/Janus.git
synced 2025-02-22 13:48:57 -05:00
Additional installation md guide
This commit is contained in:
parent
a74a59f8a9
commit
e8c72947c5
125
install.md
Normal file
125
install.md
Normal file
@ -0,0 +1,125 @@
|
||||
```markdown
|
||||
# Detailed Installation Guide
|
||||
|
||||
## Hardware Requirements
|
||||
|
||||
### Minimum Requirements
|
||||
- CPU: 4+ cores
|
||||
- RAM: 16GB
|
||||
- Storage: 10GB free space
|
||||
- GPU: NVIDIA GPU with 8GB VRAM (for GPU acceleration)
|
||||
|
||||
### Recommended Requirements
|
||||
- CPU: 8+ cores
|
||||
- RAM: 32GB
|
||||
- Storage: 20GB free space
|
||||
- GPU: NVIDIA GPU with 16GB+ VRAM (e.g., RTX 3090, A5000, A6000)
|
||||
|
||||
## Software Requirements
|
||||
|
||||
### Windows
|
||||
1. Install Python 3.8 or later
|
||||
2. Install Visual Studio Build Tools 2019 or later
|
||||
3. Install CUDA Toolkit 11.8 or later (for GPU support)
|
||||
4. Install Git
|
||||
|
||||
### Linux (Ubuntu/Debian)
|
||||
1. Update system packages:
|
||||
```bash
|
||||
sudo apt update
|
||||
sudo apt upgrade
|
||||
```
|
||||
Install required packages:
|
||||
|
||||
```bash
|
||||
sudo apt install python3-dev python3-pip git build-essential
|
||||
```
|
||||
### Install CUDA (for GPU support):
|
||||
|
||||
```bash
|
||||
# Add NVIDIA package repositories
|
||||
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-ubuntu2204.pin
|
||||
sudo mv cuda-ubuntu2204.pin /etc/apt/preferences.d/cuda-repository-pin-600
|
||||
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub
|
||||
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/ /"
|
||||
sudo apt update
|
||||
sudo apt install cuda-11-8
|
||||
```
|
||||
|
||||
### MacOS
|
||||
|
||||
Install Xcode Command Line Tools:
|
||||
```bash
|
||||
xcode-select --install
|
||||
```
|
||||
Install Homebrew (if not already installed):
|
||||
```bash
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
```
|
||||
Install Python:
|
||||
```bash
|
||||
brew install python@3.10
|
||||
```
|
||||
### Installation Steps
|
||||
#### Method 1: Using pip
|
||||
|
||||
Clone the repository:
|
||||
```bash
|
||||
clone https://github.com/deepseek-ai/Janus.git
|
||||
cd Janus
|
||||
```
|
||||
### Create and activate virtual environment:
|
||||
|
||||
Windows:
|
||||
```bash
|
||||
python -m venv janus_env
|
||||
janus_env\Scripts\activate
|
||||
```
|
||||
|
||||
Linux/MacOS:
|
||||
```bash
|
||||
python -m venv janus_env
|
||||
source janus_env/bin/activate
|
||||
```
|
||||
Install dependencies:
|
||||
|
||||
```bash
|
||||
pip install -e .
|
||||
```
|
||||
#### Method 2: Using conda
|
||||
|
||||
Create and activate conda environment:
|
||||
|
||||
```bash
|
||||
conda create -n janus python=3.10
|
||||
conda activate janus
|
||||
```
|
||||
|
||||
Install PyTorch with CUDA support:
|
||||
|
||||
```bash
|
||||
# For CUDA 11.8
|
||||
conda install pytorch torchvision torchaudio pytorch-cuda=11.8 -c pytorch -c nvidia
|
||||
```
|
||||
|
||||
Install Janus:
|
||||
```bash
|
||||
pip install -e .
|
||||
```
|
||||
### Optional Features
|
||||
|
||||
Install Gradio demo dependencies:
|
||||
|
||||
```bash
|
||||
pip install -e .[gradio]
|
||||
```
|
||||
Install development tools:
|
||||
|
||||
```bash
|
||||
pip install -e .[dev]
|
||||
```
|
||||
Install linting tools:
|
||||
|
||||
```bash
|
||||
pip install -e .[lint]
|
||||
```
|
@ -1,24 +1,22 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=40.6.0", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "janus"
|
||||
version = "1.0.0"
|
||||
description = "Janus"
|
||||
description = "Janus - Unified Multimodal Understanding and Generation Models"
|
||||
authors = [{name = "DeepSeek-AI"}]
|
||||
license = {file = "LICENSE-CODE"}
|
||||
urls = {homepage = "https://github.com/deepseek-ai/Janus"}
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.8"
|
||||
dependencies = [
|
||||
"torch>=2.0.1",
|
||||
"transformers>=4.38.2",
|
||||
"timm>=0.9.16",
|
||||
"accelerate",
|
||||
"sentencepiece",
|
||||
"attrdict",
|
||||
"einops",
|
||||
"torch>=2.0.1,<3.0.0",
|
||||
"transformers>=4.38.2,<5.0.0",
|
||||
"timm>=0.9.16,<1.0.0",
|
||||
"accelerate>=0.28.0",
|
||||
"sentencepiece>=0.2.0",
|
||||
"attrdict>=2.0.1",
|
||||
"einops>=0.8.0",
|
||||
"Pillow>=10.0.0",
|
||||
"numpy>=1.24.0",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
@ -48,6 +46,14 @@ lint = [
|
||||
"pyenchant",
|
||||
"pre-commit",
|
||||
]
|
||||
windows = [
|
||||
"pywin32>=306",
|
||||
]
|
||||
dev = [
|
||||
"pytest>=7.0.0",
|
||||
"pytest-cov>=4.1.0",
|
||||
"mypy>=1.0.0",
|
||||
]
|
||||
|
||||
[tool.setuptools]
|
||||
packages = {find = {exclude = ["images"]}}
|
||||
packages = {find = {exclude = ["images", "tests"]}}
|
Loading…
Reference in New Issue
Block a user