bobaoxu2001
Deploy: Docker-based Streamlit app with startup data generation
cfcbebf
raw
history blame contribute delete
626 Bytes
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# Remove __pycache__ dirs
RUN find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null; true
# Build pipeline data at image build time
ENV PYTHONPATH=/app
RUN python scripts/startup.py
EXPOSE 7860
HEALTHCHECK CMD curl --fail http://localhost:7860/_stcore/health || exit 1
ENTRYPOINT ["streamlit", "run", "app/Home.py", \
"--server.port=7860", \
"--server.address=0.0.0.0", \
"--server.headless=true", \
"--server.enableCORS=false", \
"--server.enableXsrfProtection=false"]