Stock-Prediction-V2 / Dockerfile
rachman's picture
Update Dockerfile
6ad8188 verified
# ===============================
# Base Image (STABLE & COMPATIBLE)
# ===============================
FROM python:3.11-slim
# ===============================
# Environment
# ===============================
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
WORKDIR /app
# ===============================
# System Dependencies
# ===============================
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
&& rm -rf /var/lib/apt/lists/*
# ===============================
# Python Dependencies
# ===============================
COPY requirements.txt .
RUN pip install --upgrade pip \
&& pip install --no-cache-dir -r requirements.txt
# ===============================
# Application Source
# ===============================
COPY src/ ./src/
# ===============================
# Streamlit Config
# ===============================
EXPOSE 8501
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health || exit 1
# ===============================
# Run Streamlit
# ===============================
ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"]