data-learner commited on
Commit
aa74694
·
verified ·
1 Parent(s): e74039d

Upload Dockerfile with huggingface_hub

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -0
Dockerfile ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # 安装 Tesseract OCR + 中文语言包 + Pillow 所需的系统库
4
+ RUN apt-get update && \
5
+ apt-get install -y --no-install-recommends \
6
+ tesseract-ocr \
7
+ tesseract-ocr-chi-sim \
8
+ libjpeg62-turbo \
9
+ zlib1g \
10
+ libfreetype6 \
11
+ liblcms2-2 \
12
+ libwebp7 \
13
+ && \
14
+ rm -rf /var/lib/apt/lists/*
15
+
16
+ # 设置工作目录
17
+ WORKDIR /app
18
+
19
+ # 复制依赖文件并安装
20
+ COPY requirements.txt .
21
+ RUN pip install --no-cache-dir -r requirements.txt
22
+
23
+ # 复制应用代码
24
+ COPY unified_server.py .
25
+ COPY export_server.py .
26
+ COPY test-h5.html .
27
+
28
+ # 暴露端口(Hugging Face Spaces 默认 7860)
29
+ EXPOSE 7860
30
+
31
+ # 启动服务
32
+ CMD ["python", "unified_server.py"]