Spaces:
Sleeping
Sleeping
FINAL FIX: Create static/uploads directory with permissions
Browse files- Dockerfile +3 -2
Dockerfile
CHANGED
|
@@ -13,7 +13,7 @@ FROM python:3.11-slim
|
|
| 13 |
|
| 14 |
WORKDIR /app
|
| 15 |
|
| 16 |
-
#
|
| 17 |
ENV TORCH_HOME=/app/cache
|
| 18 |
|
| 19 |
# Copy the downloaded model files from the 'downloader' stage
|
|
@@ -26,8 +26,9 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 26 |
# Copy the rest of the application code
|
| 27 |
COPY . .
|
| 28 |
|
| 29 |
-
# CRITICAL FIX: Create the cache
|
| 30 |
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
|
|
|
|
| 31 |
|
| 32 |
# Expose the correct port
|
| 33 |
EXPOSE 5000
|
|
|
|
| 13 |
|
| 14 |
WORKDIR /app
|
| 15 |
|
| 16 |
+
# Set the home directory for PyTorch cache to prevent permission errors
|
| 17 |
ENV TORCH_HOME=/app/cache
|
| 18 |
|
| 19 |
# Copy the downloaded model files from the 'downloader' stage
|
|
|
|
| 26 |
# Copy the rest of the application code
|
| 27 |
COPY . .
|
| 28 |
|
| 29 |
+
# CRITICAL FIX: Create the cache and static upload directories and set permissions
|
| 30 |
RUN mkdir -p /app/cache && chmod -R 777 /app/cache
|
| 31 |
+
RUN mkdir -p /app/static/uploads && chmod -R 777 /app/static
|
| 32 |
|
| 33 |
# Expose the correct port
|
| 34 |
EXPOSE 5000
|