Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +8 -6
Dockerfile
CHANGED
@@ -11,10 +11,11 @@ ENV HF_HOME=/app/cache \
|
|
11 |
XDG_CACHE_HOME=/app/cache \
|
12 |
PYTHONPATH="${PYTHONPATH}:/app"
|
13 |
|
14 |
-
# 3. Create directories with proper permissions
|
15 |
-
RUN mkdir -p /app/cache/hub && \
|
16 |
-
mkdir -p /app/cache/hub/models--hexgrad--Kokoro-82M && \
|
17 |
-
chmod -R 777 /app
|
|
|
18 |
|
19 |
WORKDIR /app
|
20 |
|
@@ -27,8 +28,9 @@ RUN pip install --upgrade pip setuptools wheel
|
|
27 |
# Then install other requirements
|
28 |
RUN pip install --no-cache-dir -r requirements.txt
|
29 |
|
30 |
-
# Pre-download the model
|
31 |
-
RUN python -c "from huggingface_hub import hf_hub_download; hf_hub_download('hexgrad/Kokoro-82M', 'config.json')"
|
|
|
32 |
|
33 |
# 5. Copy application code
|
34 |
COPY . .
|
|
|
11 |
XDG_CACHE_HOME=/app/cache \
|
12 |
PYTHONPATH="${PYTHONPATH}:/app"
|
13 |
|
14 |
+
# 3. Create all required directories with proper permissions
|
15 |
+
RUN mkdir -p /app/cache/hub/models--hexgrad--Kokoro-82M && \
|
16 |
+
mkdir -p /app/cache/hub/.locks/models--hexgrad--Kokoro-82M && \
|
17 |
+
chmod -R 777 /app && \
|
18 |
+
chmod -R 777 /app/cache/hub/.locks
|
19 |
|
20 |
WORKDIR /app
|
21 |
|
|
|
28 |
# Then install other requirements
|
29 |
RUN pip install --no-cache-dir -r requirements.txt
|
30 |
|
31 |
+
# Pre-download the model with explicit permissions
|
32 |
+
RUN python -c "from huggingface_hub import hf_hub_download; hf_hub_download('hexgrad/Kokoro-82M', 'config.json')" || true && \
|
33 |
+
chmod -R 777 /app/cache
|
34 |
|
35 |
# 5. Copy application code
|
36 |
COPY . .
|