Spaces:
Sleeping
Sleeping
Devang1290 commited on
Commit ·
dff9b72
1
Parent(s): a7cec30
fix: single uv install for unified dep resolution (root cause of click/typer crash)
Browse files- Dockerfile +14 -4
Dockerfile
CHANGED
|
@@ -15,10 +15,20 @@ RUN pip install uv
|
|
| 15 |
# Copy requirements first for Docker layer caching
|
| 16 |
COPY requirements-ci-english.txt requirements-ci-hindi.txt ./
|
| 17 |
|
| 18 |
-
#
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
# Now create non-root user (HF Spaces requirement)
|
| 24 |
RUN useradd -m -u 1000 user
|
|
|
|
| 15 |
# Copy requirements first for Docker layer caching
|
| 16 |
COPY requirements-ci-english.txt requirements-ci-hindi.txt ./
|
| 17 |
|
| 18 |
+
# ROOT CAUSE FIX: Install ALL dependencies in a SINGLE command
|
| 19 |
+
# so uv can resolve the full dependency graph at once.
|
| 20 |
+
#
|
| 21 |
+
# Previously, 3 separate `uv pip install` commands each resolved
|
| 22 |
+
# independently. The kokoro→misaki→spacy→typer→click chain needs
|
| 23 |
+
# click>=8.2.0 for Choice[T] generics, but a later install step
|
| 24 |
+
# was downgrading click, causing TypeError at import time.
|
| 25 |
+
#
|
| 26 |
+
# In GitHub Actions CI this works because everything is installed
|
| 27 |
+
# in one `uv pip install -r requirements.txt` call.
|
| 28 |
+
RUN uv pip install --system --no-cache \
|
| 29 |
+
fastapi uvicorn pydantic \
|
| 30 |
+
-r requirements-ci-english.txt \
|
| 31 |
+
-r requirements-ci-hindi.txt
|
| 32 |
|
| 33 |
# Now create non-root user (HF Spaces requirement)
|
| 34 |
RUN useradd -m -u 1000 user
|