Spaces:
Sleeping
Sleeping
Update Dockerfile
Browse files- Dockerfile +10 -3
Dockerfile
CHANGED
|
@@ -2,6 +2,9 @@ FROM python:3.9-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
|
|
|
|
|
|
|
|
|
| 5 |
# Install system dependencies
|
| 6 |
RUN apt-get update && \
|
| 7 |
apt-get install -y --no-install-recommends \
|
|
@@ -17,12 +20,16 @@ RUN apt-get update && \
|
|
| 17 |
COPY requirements.txt .
|
| 18 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 19 |
|
| 20 |
-
# Create
|
| 21 |
-
RUN
|
| 22 |
|
| 23 |
-
# Copy application
|
| 24 |
COPY app.py .
|
| 25 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
# Expose port for Gradio
|
| 27 |
EXPOSE 7860
|
| 28 |
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Set matplotlib config directory to a writable location
|
| 6 |
+
ENV MPLCONFIGDIR=/tmp/matplotlib
|
| 7 |
+
|
| 8 |
# Install system dependencies
|
| 9 |
RUN apt-get update && \
|
| 10 |
apt-get install -y --no-install-recommends \
|
|
|
|
| 20 |
COPY requirements.txt .
|
| 21 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 22 |
|
| 23 |
+
# Create an empty startup script
|
| 24 |
+
RUN echo "current_example = 'selector'" > startup.py
|
| 25 |
|
| 26 |
+
# Copy application file
|
| 27 |
COPY app.py .
|
| 28 |
|
| 29 |
+
# Set proper permissions
|
| 30 |
+
RUN chmod 777 /app
|
| 31 |
+
RUN chmod 777 /app/startup.py
|
| 32 |
+
|
| 33 |
# Expose port for Gradio
|
| 34 |
EXPOSE 7860
|
| 35 |
|