triviaverse33 / Dockerfile
RaghavenderReddy's picture
Update Dockerfile
5f7a589 verified
raw
history blame contribute delete
696 Bytes
FROM python:3.9-slim
WORKDIR /app
# Install system dependencies
RUN apt-get update && apt-get install -y \
build-essential \
curl \
software-properties-common \
git \
&& rm -rf /var/lib/apt/lists/*
# Copy Python dependencies
COPY requirements.txt ./
# Copy main app.py and any needed local modules
COPY app.py ./
# Install Python packages
RUN pip3 install --no-cache-dir -r requirements.txt
# Expose Streamlit port
EXPOSE 8501
# Healthcheck to monitor container health
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
# Launch app.py using Streamlit
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]