Spaces:
Runtime error
Runtime error
Update Dockerfile
Browse files- Dockerfile +7 -6
Dockerfile
CHANGED
|
@@ -1,25 +1,26 @@
|
|
| 1 |
-
# Base image
|
| 2 |
FROM python:3.11-slim
|
| 3 |
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
-
# Install system
|
| 8 |
RUN apt-get update && apt-get install -y git && \
|
| 9 |
apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
-
# Set Matplotlib
|
| 12 |
ENV MPLCONFIGDIR=/tmp/mplcache
|
| 13 |
|
| 14 |
# Install Python dependencies
|
| 15 |
COPY requirements.txt .
|
| 16 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 17 |
|
| 18 |
-
# Copy
|
| 19 |
COPY app.py .
|
| 20 |
|
| 21 |
-
#
|
| 22 |
EXPOSE 7860
|
| 23 |
|
| 24 |
-
# Run the
|
| 25 |
CMD ["python", "app.py"]
|
|
|
|
|
|
| 1 |
+
# Base Python image
|
| 2 |
FROM python:3.11-slim
|
| 3 |
|
| 4 |
# Set working directory
|
| 5 |
WORKDIR /app
|
| 6 |
|
| 7 |
+
# Install system-level packages
|
| 8 |
RUN apt-get update && apt-get install -y git && \
|
| 9 |
apt-get clean && rm -rf /var/lib/apt/lists/*
|
| 10 |
|
| 11 |
+
# Set Matplotlib config to avoid permission issues
|
| 12 |
ENV MPLCONFIGDIR=/tmp/mplcache
|
| 13 |
|
| 14 |
# Install Python dependencies
|
| 15 |
COPY requirements.txt .
|
| 16 |
RUN pip install --no-cache-dir -r requirements.txt
|
| 17 |
|
| 18 |
+
# Copy app
|
| 19 |
COPY app.py .
|
| 20 |
|
| 21 |
+
# Required for HF Spaces
|
| 22 |
EXPOSE 7860
|
| 23 |
|
| 24 |
+
# Run the app
|
| 25 |
CMD ["python", "app.py"]
|
| 26 |
+
|