Spaces:
Running
Running
FROM python:3.9-slim | |
WORKDIR /app | |
# Install LaTeX with a more comprehensive approach | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends \ | |
texlive \ | |
texlive-latex-extra \ | |
texlive-fonts-recommended \ | |
texlive-lang-english \ | |
texlive-science \ | |
&& apt-get clean \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Verify that pdflatex is installed and in PATH | |
RUN which pdflatex || (echo "pdflatex not found in PATH" && exit 1) | |
COPY requirements.txt . | |
RUN pip install --no-cache-dir -r requirements.txt | |
COPY app.py . | |
# Add a debugging script to check installation | |
RUN echo "#!/bin/bash\necho 'Checking pdflatex installation:'\nwhich pdflatex\nls -la \$(which pdflatex)\necho 'LaTeX version:'\npdflatex --version" > /app/check_latex.sh && \ | |
chmod +x /app/check_latex.sh | |
EXPOSE 8501 | |
# Start with the debug script then run the application | |
CMD ["/bin/bash", "-c", "/app/check_latex.sh && streamlit run app.py --server.address=0.0.0.0"] |