Skip to content

Commit 38e0b87

Browse files
committed
Initial swap to UV dependency management
1 parent 22c52fd commit 38e0b87

25 files changed

+4961
-190
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,6 @@ jobs:
4646
ruff check .
4747
4848
49-
- name: Test with pytest
49+
- name: Test API
5050
run: |
51-
pytest --asyncio-mode=auto --cov=api --cov-report=term-missing
51+
pytest api/tests/ --asyncio-mode=auto --cov=api --cov-report=term-missing

.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,19 @@ examples/assorted_checks/benchmarks/output_audio_stream/*
2626
ui/RepoScreenshot.png
2727
examples/assorted_checks/benchmarks/output_audio_stream_openai/*
2828

29+
api/src/voices/af_bella.pt
30+
api/src/voices/af_nicole.pt
31+
api/src/voices/af_sarah.pt
32+
api/src/voices/af_sky.pt
33+
api/src/voices/af.pt
34+
api/src/voices/am_adam.pt
35+
api/src/voices/am_michael.pt
36+
api/src/voices/bf_emma.pt
37+
api/src/voices/bf_isabella.pt
38+
api/src/voices/bm_george.pt
39+
api/src/voices/bm_lewis.pt
40+
examples/speech.mp3
41+
examples/phoneme_examples/output/example_1.wav
42+
examples/phoneme_examples/output/example_2.wav
43+
examples/phoneme_examples/output/example_3.wav
44+
EXTERNAL_UV_DOCUMENTATION*

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
Notable changes to this project will be documented in this file.
44

5+
## [v0.0.6] - 2025-01-10
6+
### Fixed
7+
- Fixed dependency issues:
8+
- Let PyTorch manage numpy version
9+
- Pin aiofiles to 23.2.1 for Windows compatibility
10+
- Added CI workflow for testing
11+
512
## [v0.0.5] - 2025-01-10
613
### Fixed
714
- Stabilized issues with images tagging and structures from v0.0.4

Dockerfile

Lines changed: 0 additions & 43 deletions
This file was deleted.

Dockerfile.cpu

Lines changed: 0 additions & 43 deletions
This file was deleted.

MigrationWorkingNotes.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# UV Setup
2+
Deprecated notes for myself
3+
## Structure
4+
```
5+
docker/
6+
├── cpu/
7+
│ ├── pyproject.toml # CPU deps (torch CPU)
8+
│ └── requirements.lock # CPU lockfile
9+
├── gpu/
10+
│ ├── pyproject.toml # GPU deps (torch CUDA)
11+
│ └── requirements.lock # GPU lockfile
12+
└── shared/
13+
└── pyproject.toml # Common deps
14+
```
15+
16+
## Regenerate Lock Files
17+
18+
### CPU
19+
```bash
20+
cd docker/cpu
21+
uv pip compile pyproject.toml ../shared/pyproject.toml --output-file requirements.lock
22+
```
23+
24+
### GPU
25+
```bash
26+
cd docker/gpu
27+
uv pip compile pyproject.toml ../shared/pyproject.toml --output-file requirements.lock
28+
```
29+
30+
## Local Dev Setup
31+
32+
### CPU
33+
```bash
34+
cd docker/cpu
35+
uv venv
36+
.venv\Scripts\activate # Windows
37+
uv pip sync requirements.lock
38+
```
39+
40+
### GPU
41+
```bash
42+
cd docker/gpu
43+
uv venv
44+
.venv\Scripts\activate # Windows
45+
uv pip sync requirements.lock --extra-index-url https://download.pytorch.org/whl/cu121 --index-strategy unsafe-best-match
46+
```
47+
48+
### Run Server
49+
```bash
50+
# From project root with venv active:
51+
uvicorn api.src.main:app --reload
52+
```
53+
54+
## Docker
55+
56+
### CPU
57+
```bash
58+
cd docker/cpu
59+
docker compose up
60+
```
61+
62+
### GPU
63+
```bash
64+
cd docker/gpu
65+
docker compose up
66+
```
67+
68+
## Known Issues
69+
- Module imports: Run server from project root
70+
- PyTorch CUDA: Always use --extra-index-url and --index-strategy for GPU env

README_UV.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# UV Setup
2+
3+
## Structure
4+
```
5+
docker/
6+
├── cpu/
7+
│ ├── pyproject.toml # CPU deps (torch CPU)
8+
│ └── requirements.lock # CPU lockfile
9+
├── gpu/
10+
│ ├── pyproject.toml # GPU deps (torch CUDA)
11+
│ └── requirements.lock # GPU lockfile
12+
└── shared/
13+
└── pyproject.toml # Common deps
14+
```
15+
16+
## Regenerate Lock Files
17+
18+
### CPU
19+
```bash
20+
cd docker/cpu
21+
uv pip compile pyproject.toml ../shared/pyproject.toml --output-file requirements.lock
22+
```
23+
24+
### GPU
25+
```bash
26+
cd docker/gpu
27+
uv pip compile pyproject.toml ../shared/pyproject.toml --output-file requirements.lock
28+
```
29+
30+
## Local Dev Setup
31+
32+
### CPU
33+
```bash
34+
cd docker/cpu
35+
uv venv
36+
.venv\Scripts\activate # Windows
37+
uv pip sync requirements.lock
38+
```
39+
40+
### GPU
41+
```bash
42+
cd docker/gpu
43+
uv venv
44+
.venv\Scripts\activate # Windows
45+
uv pip sync requirements.lock --extra-index-url https://download.pytorch.org/whl/cu121 --index-strategy unsafe-best-match
46+
```
47+
48+
### Run Server
49+
```bash
50+
# From project root with venv active:
51+
uvicorn api.src.main:app --reload
52+
```
53+
54+
## Docker
55+
56+
### CPU
57+
```bash
58+
cd docker/cpu
59+
docker compose up
60+
```
61+
62+
### GPU
63+
```bash
64+
cd docker/gpu
65+
docker compose up
66+
```
67+
68+
## Known Issues
69+
- Module imports: Run server from project root
70+
- PyTorch CUDA: Always use --extra-index-url and --index-strategy for GPU env

docker-compose.yml

Lines changed: 0 additions & 79 deletions
This file was deleted.

0 commit comments

Comments
 (0)