AiAi0 / dockerfile.yml
acecalisto3's picture
Update dockerfile.yml
273bb6f verified
raw
history blame contribute delete
633 Bytes
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"]