Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +4 -2
Dockerfile
CHANGED
|
@@ -8,11 +8,13 @@ WORKDIR /app
|
|
| 8 |
COPY requirements.txt .
|
| 9 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
|
| 11 |
-
# Create cache
|
| 12 |
RUN mkdir -p /app/cache && chmod 777 /app/cache
|
|
|
|
| 13 |
|
| 14 |
-
# Set environment
|
| 15 |
ENV HF_HOME=/app/cache
|
|
|
|
| 16 |
|
| 17 |
# Copy the application code
|
| 18 |
COPY main.py .
|
|
|
|
| 8 |
COPY requirements.txt .
|
| 9 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 10 |
|
| 11 |
+
# Create cache and config directories with appropriate permissions
|
| 12 |
RUN mkdir -p /app/cache && chmod 777 /app/cache
|
| 13 |
+
RUN mkdir -p /app/config && chmod 777 /app/config
|
| 14 |
|
| 15 |
+
# Set environment variables for Hugging Face cache and config directories
|
| 16 |
ENV HF_HOME=/app/cache
|
| 17 |
+
ENV XDG_CONFIG_HOME=/app/config
|
| 18 |
|
| 19 |
# Copy the application code
|
| 20 |
COPY main.py .
|