Avitesh Murmu
commited on
Commit
Β·
8aef2fd
1
Parent(s):
0d97019
Fix case sensitivity and add CDN fallback
Browse files- Dockerfile +9 -5
Dockerfile
CHANGED
|
@@ -1,6 +1,6 @@
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
-
# 1. Install system dependencies (
|
| 4 |
USER root
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
unzip \
|
|
@@ -22,13 +22,17 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 22 |
# 4. Copy your project files
|
| 23 |
COPY --chown=user . .
|
| 24 |
|
| 25 |
-
# 5. UNZIP
|
| 26 |
-
#
|
| 27 |
-
RUN if [ -f "vcsky.zip" ]; then
|
|
|
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
# 6. Hugging Face Spaces MUST listen on port 7860
|
| 30 |
EXPOSE 7860
|
| 31 |
|
| 32 |
# 7. Start the app
|
| 33 |
-
# Use --vcsky_local
|
| 34 |
CMD ["python", "server.py", "--port", "7860", "--vcbr_local", "--vcsky_local", "--custom_saves"]
|
|
|
|
| 1 |
FROM python:3.11-slim
|
| 2 |
|
| 3 |
+
# 1. Install system dependencies (unzip + findutils)
|
| 4 |
USER root
|
| 5 |
RUN apt-get update && apt-get install -y \
|
| 6 |
unzip \
|
|
|
|
| 22 |
# 4. Copy your project files
|
| 23 |
COPY --chown=user . .
|
| 24 |
|
| 25 |
+
# 5. UNZIP and FIX CASE SENSITIVITY
|
| 26 |
+
# This unzips, then finds every file/folder and renames it to lowercase
|
| 27 |
+
RUN if [ -f "vcsky.zip" ]; then \
|
| 28 |
+
unzip vcsky.zip -d vcsky && \
|
| 29 |
+
rm vcsky.zip && \
|
| 30 |
+
find vcsky -exec sh -c 'mv "$1" "$(echo "$1" | tr [:upper:] [:lower:])"' -- {} + 2>/dev/null || true; \
|
| 31 |
+
fi
|
| 32 |
|
| 33 |
# 6. Hugging Face Spaces MUST listen on port 7860
|
| 34 |
EXPOSE 7860
|
| 35 |
|
| 36 |
# 7. Start the app
|
| 37 |
+
# Use --vcsky_cache instead of --vcsky_local as a safety fallback
|
| 38 |
CMD ["python", "server.py", "--port", "7860", "--vcbr_local", "--vcsky_local", "--custom_saves"]
|