forked from LiveCarta/ContentGeneration
Migrate to uv sync and pytest coverage workflow
This commit is contained in:
33
README.md
33
README.md
@@ -14,9 +14,8 @@ Local Python:
|
||||
|
||||
```bash
|
||||
cp .env.example .env
|
||||
python3 -m venv .venv && source .venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
python run_video_pipeline.py
|
||||
uv sync --dev
|
||||
uv run python run_video_pipeline.py
|
||||
```
|
||||
|
||||
Docker (GPU):
|
||||
@@ -61,8 +60,9 @@ docker run --rm --gpus all --env-file .env \
|
||||
1. Linux with NVIDIA GPU and CUDA runtime.
|
||||
2. `ffmpeg` and `ffprobe` available on PATH.
|
||||
3. Python 3.10+.
|
||||
4. Hunyuan model checkpoints under `HunyuanVideo-1.5/ckpts`.
|
||||
5. If using FLUX local download, access approved for `black-forest-labs/FLUX.1-schnell`.
|
||||
4. `uv` installed (https://docs.astral.sh/uv/).
|
||||
5. Hunyuan model checkpoints under `HunyuanVideo-1.5/ckpts`.
|
||||
6. If using FLUX local download, access approved for `black-forest-labs/FLUX.1-schnell`.
|
||||
|
||||
## Environment Variables
|
||||
|
||||
@@ -82,29 +82,28 @@ cp .env.example .env
|
||||
1. Create and activate a virtual environment:
|
||||
|
||||
```bash
|
||||
python3 -m venv .venv
|
||||
uv venv
|
||||
source .venv/bin/activate
|
||||
```
|
||||
|
||||
2. Install Python dependencies:
|
||||
|
||||
```bash
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
uv sync --dev
|
||||
```
|
||||
|
||||
3. Install Hunyuan dependencies:
|
||||
|
||||
```bash
|
||||
pip install -r HunyuanVideo-1.5/requirements.txt
|
||||
pip install --upgrade tencentcloud-sdk-python
|
||||
pip install sgl-kernel==0.3.18
|
||||
uv pip install -r HunyuanVideo-1.5/requirements.txt
|
||||
uv pip install --upgrade tencentcloud-sdk-python
|
||||
uv pip install sgl-kernel==0.3.18
|
||||
```
|
||||
|
||||
4. Run full pipeline:
|
||||
|
||||
```bash
|
||||
python run_video_pipeline.py
|
||||
uv run python run_video_pipeline.py
|
||||
```
|
||||
|
||||
5. Common options:
|
||||
@@ -207,5 +206,13 @@ docker run --rm --gpus all \
|
||||
8. Verify syntax quickly before running.
|
||||
|
||||
```bash
|
||||
python3 -m py_compile run_video_pipeline.py src/*.py
|
||||
uv run python -m py_compile run_video_pipeline.py src/*.py
|
||||
```
|
||||
|
||||
## Testing
|
||||
|
||||
Run tests with coverage:
|
||||
|
||||
```bash
|
||||
uv run pytest
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user