Spaces:
Runtime error
Runtime error
dockerfile permissions
Browse files- Dockerfile +10 -3
Dockerfile
CHANGED
|
@@ -46,16 +46,23 @@ COPY data ./data
|
|
| 46 |
# Copy the built frontend from the builder stage
|
| 47 |
COPY --from=builder /app/ui/claimcheck-ui/dist ./static
|
| 48 |
|
| 49 |
-
# Create necessary directories and fix permissions
|
| 50 |
RUN mkdir -p kb/index data/audio /.cache && \
|
| 51 |
-
chmod
|
| 52 |
-
chmod -R 777 /
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
# Set environment variables for production
|
| 55 |
ENV PYTHONUNBUFFERED=1
|
| 56 |
ENV HOST=0.0.0.0
|
| 57 |
ENV PORT=7860
|
| 58 |
ENV HF_HOME=/.cache
|
|
|
|
|
|
|
|
|
|
| 59 |
ENV MPLCONFIGDIR=/app/.config/matplotlib
|
| 60 |
|
| 61 |
# Expose the port for Hugging Face Spaces
|
|
|
|
| 46 |
# Copy the built frontend from the builder stage
|
| 47 |
COPY --from=builder /app/ui/claimcheck-ui/dist ./static
|
| 48 |
|
| 49 |
+
# Create necessary directories and fix permissions for HuggingFace Spaces
|
| 50 |
RUN mkdir -p kb/index data/audio /.cache && \
|
| 51 |
+
chmod 777 /.cache && \
|
| 52 |
+
chmod -R 777 kb/index && \
|
| 53 |
+
chmod -R 777 data && \
|
| 54 |
+
chmod -R 755 app && \
|
| 55 |
+
mkdir -p /tmp && \
|
| 56 |
+
chmod 777 /tmp
|
| 57 |
|
| 58 |
# Set environment variables for production
|
| 59 |
ENV PYTHONUNBUFFERED=1
|
| 60 |
ENV HOST=0.0.0.0
|
| 61 |
ENV PORT=7860
|
| 62 |
ENV HF_HOME=/.cache
|
| 63 |
+
ENV TMPDIR=/tmp
|
| 64 |
+
ENV TRANSFORMERS_CACHE=/.cache
|
| 65 |
+
ENV HUGGINGFACE_HUB_CACHE=/.cache
|
| 66 |
ENV MPLCONFIGDIR=/app/.config/matplotlib
|
| 67 |
|
| 68 |
# Expose the port for Hugging Face Spaces
|