euler314 commited on
Commit
df162fc
·
verified ·
1 Parent(s): e126dcf

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +13 -9
Dockerfile CHANGED
@@ -2,19 +2,23 @@ FROM python:3.9-slim
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
@@ -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 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
 
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