File size: 721 Bytes
aa74694
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
FROM python:3.10-slim

# 安装 Tesseract OCR + 中文语言包 + Pillow 所需的系统库
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        tesseract-ocr \
        tesseract-ocr-chi-sim \
        libjpeg62-turbo \
        zlib1g \
        libfreetype6 \
        liblcms2-2 \
        libwebp7 \
        && \
    rm -rf /var/lib/apt/lists/*

# 设置工作目录
WORKDIR /app

# 复制依赖文件并安装
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# 复制应用代码
COPY unified_server.py .
COPY export_server.py .
COPY test-h5.html .

# 暴露端口(Hugging Face Spaces 默认 7860)
EXPOSE 7860

# 启动服务
CMD ["python", "unified_server.py"]