Avitesh Murmu commited on
Commit
8aef2fd
Β·
1 Parent(s): 0d97019

Fix case sensitivity and add CDN fallback

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -5
Dockerfile CHANGED
@@ -1,6 +1,6 @@
1
  FROM python:3.11-slim
2
 
3
- # 1. Install system dependencies (needed for unzipping)
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 the assets
26
- # We unzip vcsky.zip into a folder named vcsky
27
- RUN if [ -f "vcsky.zip" ]; then unzip vcsky.zip -d vcsky && rm vcsky.zip; fi
 
 
 
 
28
 
29
  # 6. Hugging Face Spaces MUST listen on port 7860
30
  EXPOSE 7860
31
 
32
  # 7. Start the app
33
- # Use --vcsky_local because we just unzipped it!
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"]