Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +12 -2
Dockerfile
CHANGED
@@ -2,20 +2,30 @@ FROM python:3.9-slim
|
|
2 |
|
3 |
WORKDIR /app
|
4 |
|
|
|
5 |
RUN apt-get update && \
|
6 |
apt-get install -y --no-install-recommends \
|
7 |
-
texlive
|
8 |
texlive-latex-extra \
|
9 |
texlive-fonts-recommended \
|
|
|
10 |
texlive-science \
|
11 |
&& apt-get clean \
|
12 |
&& rm -rf /var/lib/apt/lists/*
|
13 |
|
|
|
|
|
|
|
14 |
COPY requirements.txt .
|
15 |
RUN pip install --no-cache-dir -r requirements.txt
|
16 |
|
17 |
COPY app.py .
|
18 |
|
|
|
|
|
|
|
|
|
19 |
EXPOSE 8501
|
20 |
|
21 |
-
|
|
|
|
2 |
|
3 |
WORKDIR /app
|
4 |
|
5 |
+
# Install LaTeX with a more comprehensive approach
|
6 |
RUN apt-get update && \
|
7 |
apt-get install -y --no-install-recommends \
|
8 |
+
texlive \
|
9 |
texlive-latex-extra \
|
10 |
texlive-fonts-recommended \
|
11 |
+
texlive-lang-english \
|
12 |
texlive-science \
|
13 |
&& apt-get clean \
|
14 |
&& rm -rf /var/lib/apt/lists/*
|
15 |
|
16 |
+
# Verify that pdflatex is installed and in PATH
|
17 |
+
RUN which pdflatex || (echo "pdflatex not found in PATH" && exit 1)
|
18 |
+
|
19 |
COPY requirements.txt .
|
20 |
RUN pip install --no-cache-dir -r requirements.txt
|
21 |
|
22 |
COPY app.py .
|
23 |
|
24 |
+
# Add a debugging script to check installation
|
25 |
+
RUN echo "#!/bin/bash\necho 'Checking pdflatex installation:'\nwhich pdflatex\nls -la \$(which pdflatex)\necho 'LaTeX version:'\npdflatex --version" > /app/check_latex.sh && \
|
26 |
+
chmod +x /app/check_latex.sh
|
27 |
+
|
28 |
EXPOSE 8501
|
29 |
|
30 |
+
# Start with the debug script then run the application
|
31 |
+
CMD ["/bin/bash", "-c", "/app/check_latex.sh && streamlit run app.py --server.address=0.0.0.0"]
|