| FROM python:3.12.8-slim |
|
|
| WORKDIR /app |
|
|
| |
| |
| |
| |
| |
| |
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| build-essential \ |
| curl \ |
| git \ |
| ca-certificates \ |
| libfreetype6 \ |
| libpng16-16 \ |
| fonts-dejavu-core \ |
| libglib2.0-0 \ |
| libsm6 \ |
| libxext6 \ |
| libxrender1 \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| ENV PYTHONDONTWRITEBYTECODE=1 \ |
| PYTHONUNBUFFERED=1 \ |
| PIP_NO_CACHE_DIR=1 \ |
| STREAMLIT_SERVER_HEADLESS=true \ |
| STREAMLIT_BROWSER_GATHER_USAGE_STATS=false \ |
| MPLBACKEND=Agg \ |
| MPLCONFIGDIR=/tmp/matplotlib |
|
|
| |
| RUN python -m pip install --upgrade pip setuptools wheel |
|
|
| |
| COPY requirements.txt ./ |
| RUN pip3 install -r requirements.txt |
|
|
| |
| COPY pwa-head-inject.html ./pwa-head-inject.html |
| COPY inject-pwa-head.sh ./inject-pwa-head.sh |
| RUN chmod +x ./inject-pwa-head.sh && ./inject-pwa-head.sh |
|
|
| |
| COPY app.py ./app.py |
| COPY wrdler ./wrdler |
| COPY static ./static |
|
|
| |
|
|
| EXPOSE 8501 |
|
|
| HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health |
|
|
| |
|
|
| |
| ENTRYPOINT ["sh", "-c", "streamlit run app.py --server.port=${PORT:-8501} --server.address=0.0.0.0"] |