Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +4 -2
Dockerfile
CHANGED
|
@@ -19,15 +19,17 @@ ENV TRANSFORMERS_CACHE=/app/.cache/transformers
|
|
| 19 |
ENV HF_HOME=/app/.cache/huggingface
|
| 20 |
ENV HF_DATASETS_CACHE=/app/.cache/datasets
|
| 21 |
ENV XDG_CACHE_HOME=/app/.cache
|
|
|
|
| 22 |
RUN mkdir -p /app/.cache/transformers /app/.cache/huggingface /app/.cache/datasets
|
| 23 |
-
RUN chmod -R 777 /app/.cache
|
| 24 |
|
| 25 |
# Copy requirements and install Python deps (no cache to slim image)
|
| 26 |
COPY requirements.txt .
|
| 27 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 28 |
|
| 29 |
-
# Copy app code
|
| 30 |
COPY app.py .
|
|
|
|
| 31 |
|
| 32 |
# Expose port (HF Spaces default)
|
| 33 |
EXPOSE 7860
|
|
|
|
| 19 |
ENV HF_HOME=/app/.cache/huggingface
|
| 20 |
ENV HF_DATASETS_CACHE=/app/.cache/datasets
|
| 21 |
ENV XDG_CACHE_HOME=/app/.cache
|
| 22 |
+
|
| 23 |
RUN mkdir -p /app/.cache/transformers /app/.cache/huggingface /app/.cache/datasets
|
| 24 |
+
RUN chmod -R 777 /app/.cache # Ensure full write access
|
| 25 |
|
| 26 |
# Copy requirements and install Python deps (no cache to slim image)
|
| 27 |
COPY requirements.txt .
|
| 28 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 29 |
|
| 30 |
+
# Copy app code and db_helper
|
| 31 |
COPY app.py .
|
| 32 |
+
COPY db_helper.py .
|
| 33 |
|
| 34 |
# Expose port (HF Spaces default)
|
| 35 |
EXPOSE 7860
|