Spaces:
Sleeping
Sleeping
| FROM python:3.12.3-slim | |
| WORKDIR /app | |
| ENV HOME=/app | |
| ENV STREAMLIT_BROWSER_GATHERUSAGESTATS=false | |
| # Utwórz katalog na pliki Streamlita i wyłącz telemetry w configu | |
| RUN mkdir -p /app/.streamlit \ | |
| /app/.cache/huggingface \ | |
| /app/.cache/fontconfig \ | |
| /app/.cache/matplotlib \ | |
| /app/.config/matplotlib \ | |
| && printf "[browser]\ngatherUsageStats = false\n" > /app/.streamlit/config.toml \ | |
| # Daj pełne prawa na wypadek, gdyby runtime zmieniał użytkownika | |
| && chmod -R 777 /app/.streamlit /app/.cache /app/.config | |
| RUN apt-get update && apt-get install -y \ | |
| build-essential \ | |
| ffmpeg \ | |
| curl \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| COPY requirements.txt ./ | |
| COPY src/ ./src/ | |
| RUN pip3 install -r requirements.txt | |
| EXPOSE 8501 | |
| HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health | |
| ENTRYPOINT ["streamlit", "run", "src/streamlit_app.py", "--server.port=8501", "--server.address=0.0.0.0"] |