| |
| FROM python:3.10-slim |
|
|
| |
| WORKDIR /app |
|
|
| |
| RUN apt-get update && apt-get install -y \ |
| build-essential \ |
| libcairo2-dev \ |
| libpango1.0-dev \ |
| ffmpeg \ |
| libgirepository1.0-dev \ |
| gir1.2-gtk-3.0 \ |
| libgstreamer1.0-dev \ |
| libgstreamer-plugins-base1.0-dev \ |
| libgstreamer-plugins-bad1.0-dev \ |
| gstreamer1.0-plugins-base \ |
| gstreamer1.0-plugins-good \ |
| gstreamer1.0-plugins-bad \ |
| gstreamer1.0-plugins-ugly \ |
| gstreamer1.0-libav \ |
| gstreamer1.0-tools \ |
| gstreamer1.0-x \ |
| gstreamer1.0-alsa \ |
| gstreamer1.0-gl \ |
| gstreamer1.0-gtk3 \ |
| gstreamer1.0-qt5 \ |
| gstreamer1.0-pulseaudio \ |
| |
| texlive-latex-base \ |
| texlive-latex-extra \ |
| texlive-fonts-extra \ |
| texlive-latex-recommended \ |
| texlive-science \ |
| latexmk \ |
| dvisvgm \ |
| fontconfig \ |
| && rm -rf /var/lib/apt/lists/* \ |
| && apt-get clean |
|
|
| |
| RUN mkdir -p /tmp/manimate/output \ |
| && mkdir -p /tmp/matplotlib \ |
| && mkdir -p /tmp/fontconfig \ |
| && chmod 777 /tmp/matplotlib \ |
| && chmod 777 /tmp/fontconfig \ |
| && fc-cache -f -v |
|
|
| |
| ENV FONTCONFIG_PATH=/etc/fonts |
| ENV FONTCONFIG_FILE=/etc/fonts/fonts.conf |
| ENV FONTCONFIG_CACHE=/tmp/fontconfig |
|
|
| |
| COPY requirements.txt . |
|
|
| |
| RUN python -m pip install --no-cache-dir --upgrade pip && \ |
| pip install --no-cache-dir -r requirements.txt && \ |
| pip install --no-cache-dir streamlit==1.28.0 && \ |
| pip cache purge |
|
|
| |
| COPY . . |
|
|
| |
| ENV PYTHONUNBUFFERED=1 |
| ENV PYTHONPATH=/app |
| ENV STREAMLIT_SERVER_PORT=8501 |
| ENV STREAMLIT_SERVER_ADDRESS=0.0.0.0 |
| ENV STREAMLIT_SERVER_HEADLESS=true |
| ENV STREAMLIT_BROWSER_GATHER_USAGE_STATS=false |
| ENV MPLCONFIGDIR=/tmp/matplotlib |
|
|
| |
| EXPOSE 8501 |
|
|
| |
| HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 \ |
| CMD curl -f http://localhost:8501/_stcore/health || exit 1 |
| |
| |
| CMD ["streamlit", "run", "app.py", "--server.port=8501", "--server.address=0.0.0.0"] |