Spaces:
Sleeping
Sleeping
| # Base Image | |
| FROM python:3.11-slim | |
| # Set environment variables | |
| ENV PYTHONDONTWRITEBYTECODE=1 | |
| ENV PYTHONUNBUFFERED=1 | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| # Install System Dependencies | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| libcairo2-dev \ | |
| libpango1.0-dev \ | |
| libglib2.0-dev \ | |
| ffmpeg \ | |
| pkg-config \ | |
| # LaTeX packages | |
| texlive-latex-base \ | |
| texlive-latex-extra \ | |
| texlive-fonts-recommended \ | |
| texlive-fonts-extra \ | |
| texlive-science \ | |
| texlive-latex-recommended \ | |
| latexmk \ | |
| # Required for dvi to svg/png conversion | |
| dvisvgm \ | |
| dvipng \ | |
| # Additional tools | |
| cm-super \ | |
| && apt-get clean \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Work Directory | |
| WORKDIR /app | |
| # Install Python Dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy App | |
| COPY . . | |
| # Expose Streamlit Port | |
| EXPOSE 7860 | |
| # Run App | |
| CMD sh -c "streamlit run app.py --server.port=${PORT:-7860} --server.address=0.0.0.0 --server.headless=true --server.fileWatcherType=none" | |