Spaces:
Running
Running
File size: 1,297 Bytes
384fcdf df162fc 384fcdf df162fc 384fcdf df162fc 8e717ce 384fcdf 8e717ce df162fc 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 32 33 34 35 |
FROM python:3.9-slim
WORKDIR /app
# Install LaTeX with comprehensive Chinese support
RUN apt-get update && \
apt-get install -y --no-install-recommends \
texlive-full \
fonts-noto-cjk \
fonts-noto-cjk-extra \
fonts-wqy-microhei \
fonts-wqy-zenhei \
fonts-arphic-ukai \
fonts-arphic-uming \
fontconfig \
&& fc-cache -fv \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Verify that all LaTeX engines are installed and in PATH
RUN which pdflatex && which xelatex && which lualatex || (echo "LaTeX engines 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 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 && \
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"] |