chriswu25 commited on
Commit
a9a3f60
·
verified ·
1 Parent(s): be32bc2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -8
Dockerfile CHANGED
@@ -2,17 +2,11 @@ FROM ghcr.io/astral-sh/uv:python3.12-bookworm-slim
2
 
3
  WORKDIR /app
4
 
5
-
6
  EXPOSE 7860
7
 
8
  ENV PYTHONUNBUFFERED=1
9
 
10
- # # Download all required fonts
11
- # ADD "https://github.com/satbyy/go-noto-universal/releases/download/v7.0/GoNotoKurrent-Regular.ttf" /app/
12
- # ADD "https://github.com/timelic/source-han-serif/releases/download/main/SourceHanSerifCN-Regular.ttf" /app/
13
- # ADD "https://github.com/timelic/source-han-serif/releases/download/main/SourceHanSerifTW-Regular.ttf" /app/
14
- # ADD "https://github.com/timelic/source-han-serif/releases/download/main/SourceHanSerifJP-Regular.ttf" /app/
15
- # ADD "https://github.com/timelic/source-han-serif/releases/download/main/SourceHanSerifKR-Regular.ttf" /app/
16
 
17
  RUN apt-get update && \
18
  apt-get install --no-install-recommends -y libgl1 libglib2.0-0 libxext6 libsm6 libxrender1 && \
@@ -25,4 +19,9 @@ COPY . .
25
 
26
  RUN uv pip install --system --no-cache . && uv pip install --system --no-cache -U babeldoc "pymupdf<1.25.3" && babeldoc --version && babeldoc --warmup
27
 
28
- CMD ["pdf2zh", "-i"]
 
 
 
 
 
 
2
 
3
  WORKDIR /app
4
 
 
5
  EXPOSE 7860
6
 
7
  ENV PYTHONUNBUFFERED=1
8
 
9
+ # ... (你的字体下载命令,如果需要的话) ...
 
 
 
 
 
10
 
11
  RUN apt-get update && \
12
  apt-get install --no-install-recommends -y libgl1 libglib2.0-0 libxext6 libsm6 libxrender1 && \
 
19
 
20
  RUN uv pip install --system --no-cache . && uv pip install --system --no-cache -U babeldoc "pymupdf<1.25.3" && babeldoc --version && babeldoc --warmup
21
 
22
+ # ----- 添加以下两行来创建并设置缓存目录权限 -----
23
+ RUN mkdir -p /root/.cache/pdf2zh
24
+ RUN chmod 777 /root/.cache/pdf2zh
25
+ # -------------------------------------------------
26
+
27
+ CMD ["pdf2zh", "-i"]