Spaces:
Sleeping
Sleeping
File size: 633 Bytes
273bb6f 9b49ed1 8058749 273bb6f 8058749 273bb6f 8058749 273bb6f 8058749 273bb6f |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
FROM python:3.9-slim
WORKDIR /app
# Install git and other dependencies
RUN apt-get update && apt-get install -y git curl
# Copy requirements first to leverage Docker cache
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Expose the Streamlit port
EXPOSE 8501
# Health check to ensure the container is running properly
HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 CMD curl -f http://localhost:8501/_stcore/health || exit 1
# Command to run the application
ENTRYPOINT ["streamlit", "run", "app.py", "--server.address", "0.0.0.0"] |