Spaces:
Runtime error
Runtime error
File size: 770 Bytes
7506572 eac8d20 7506572 eac8d20 7506572 eac8d20 7506572 eac8d20 7506572 eac8d20 7506572 eac8d20 7506572 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | # Use a specific Python version as a base image
FROM python:3.10-slim
# Set the working directory in the container
WORKDIR /app
# Copy the requirements file into the container
COPY requirements.txt ./
# Install the Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of your application code
COPY . .
# Expose the port that Hugging Face uses
EXPOSE 7860
# Command to run the Streamlit app
# This tells Streamlit to run on the correct port and in a container-friendly way
# NEW: Add a health check to tell Hugging Face when the app is ready
HEALTHCHECK --interval=30s --timeout=10s --retries=3 CMD curl --fail http://localhost:7860/_stcore/health
CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.headless=true"] |