File size: 968 Bytes
384fcdf
 
 
 
8e717ce
384fcdf
 
8e717ce
384fcdf
 
8e717ce
384fcdf
 
 
 
8e717ce
 
 
384fcdf
 
 
 
 
8e717ce
 
 
 
384fcdf
 
8e717ce
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
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"]