Jerry75AI commited on
Commit
9fc7de8
·
verified ·
1 Parent(s): 4d80abd

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfile +27 -0
  2. README.md +4 -4
Dockerfile ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM awwaawwa/pdfmathtranslate-next:dev
2
+
3
+ WORKDIR /app
4
+
5
+ ENV PYTHONUNBUFFERED=1
6
+
7
+ RUN apt-get update && apt-get install -y libgl1 \
8
+ && rm -rf /var/lib/apt/lists/*
9
+
10
+ RUN mkdir -p /data
11
+ RUN chmod 777 /data
12
+ RUN mkdir -p /app
13
+ RUN chmod 777 /app
14
+ RUN mkdir -p /.cache
15
+ RUN chmod 777 /.cache
16
+ RUN mkdir -p ./gradio_files
17
+ RUN chmod 777 ./gradio_files
18
+ RUN mkdir -p /.config
19
+ RUN chmod 777 /.config
20
+ RUN mkdir -p /.config/PDFMathTranslate
21
+ RUN chmod 777 /.config/PDFMathTranslate
22
+
23
+
24
+ # write several lines to the file /.config/PDFMathTranslate/config.json
25
+ RUN echo '{ "USE_MODELSCOPE": "0", "PDF2ZH_LANG_FROM": "English", "PDF2ZH_LANG_TO": "Simplified Chinese", "NOTO_FONT_PATH": "/app/SourceHanSerifCN-Regular.ttf", "translators":[]}' > /.config/PDFMathTranslate/config.json
26
+ RUN chmod 777 /.config/PDFMathTranslate/config.json
27
+ CMD ["pdf2zh_next", "--gui", "--config", "/.config/PDFMathTranslate/config.json"]
README.md CHANGED
@@ -1,11 +1,11 @@
1
  ---
2
  title: PDFTranslate
3
- emoji: 🦀
4
- colorFrom: gray
5
- colorTo: pink
6
  sdk: docker
 
7
  pinned: false
8
  license: apache-2.0
9
  ---
10
 
11
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
  title: PDFTranslate
3
+ emoji: 📚
4
+ colorFrom: blue
5
+ colorTo: green
6
  sdk: docker
7
+ app_port: 7860
8
  pinned: false
9
  license: apache-2.0
10
  ---
11