| FROM python:3.10-slim |
|
|
| WORKDIR /app |
|
|
| |
| ENV STREAMLIT_CONFIG_DIR=/app/.streamlit |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| build-essential \ |
| curl \ |
| software-properties-common \ |
| git \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| COPY requirements.txt ./ |
| COPY app.py ./ |
| COPY assets ./assets |
|
|
| |
| RUN pip3 install --no-cache-dir -r requirements.txt |
|
|
| |
| RUN mkdir -p /app/.streamlit && \ |
| chown -R 1000:1000 /app && \ |
| chmod -R u+rw /app/.streamlit && \ |
| echo "[browser]\ngatherUsageStats = false" > /app/.streamlit/config.toml |
|
|
| |
| USER 1000:1000 |
|
|
| EXPOSE 8501 |
|
|
| HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health |
|
|
| ENTRYPOINT ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] |