Spaces:
Build error
Build error
Update Dockerfile
Browse files- Dockerfile +13 -9
Dockerfile
CHANGED
|
@@ -2,19 +2,23 @@ FROM python:3.9-slim
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
-
# Install LaTeX with
|
| 6 |
RUN apt-get update && \
|
| 7 |
apt-get install -y --no-install-recommends \
|
| 8 |
-
texlive \
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
&& apt-get clean \
|
| 14 |
&& rm -rf /var/lib/apt/lists/*
|
| 15 |
|
| 16 |
-
# Verify that
|
| 17 |
-
RUN which pdflatex || (echo "
|
| 18 |
|
| 19 |
COPY requirements.txt .
|
| 20 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
@@ -22,7 +26,7 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 22 |
COPY app.py .
|
| 23 |
|
| 24 |
# Add a debugging script to check installation
|
| 25 |
-
RUN echo "#!/bin/bash\necho 'Checking
|
| 26 |
chmod +x /app/check_latex.sh
|
| 27 |
|
| 28 |
EXPOSE 8501
|
|
|
|
| 2 |
|
| 3 |
WORKDIR /app
|
| 4 |
|
| 5 |
+
# Install LaTeX with comprehensive Chinese support
|
| 6 |
RUN apt-get update && \
|
| 7 |
apt-get install -y --no-install-recommends \
|
| 8 |
+
texlive-full \
|
| 9 |
+
fonts-noto-cjk \
|
| 10 |
+
fonts-noto-cjk-extra \
|
| 11 |
+
fonts-wqy-microhei \
|
| 12 |
+
fonts-wqy-zenhei \
|
| 13 |
+
fonts-arphic-ukai \
|
| 14 |
+
fonts-arphic-uming \
|
| 15 |
+
fontconfig \
|
| 16 |
+
&& fc-cache -fv \
|
| 17 |
&& apt-get clean \
|
| 18 |
&& rm -rf /var/lib/apt/lists/*
|
| 19 |
|
| 20 |
+
# Verify that all LaTeX engines are installed and in PATH
|
| 21 |
+
RUN which pdflatex && which xelatex && which lualatex || (echo "LaTeX engines not found in PATH" && exit 1)
|
| 22 |
|
| 23 |
COPY requirements.txt .
|
| 24 |
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
| 26 |
COPY app.py .
|
| 27 |
|
| 28 |
# Add a debugging script to check installation
|
| 29 |
+
RUN echo "#!/bin/bash\necho 'Checking LaTeX engines installation:'\necho 'pdflatex:' && which pdflatex && pdflatex --version | head -1\necho 'xelatex:' && which xelatex && xelatex --version | head -1\necho 'lualatex:' && which lualatex && lualatex --version | head -1\necho 'Available fonts:'\nfc-list | grep -i 'noto\\|wqy\\|arphic' | head -10" > /app/check_latex.sh && \
|
| 30 |
chmod +x /app/check_latex.sh
|
| 31 |
|
| 32 |
EXPOSE 8501
|