Spaces:
Running
Running
fix: config file
Browse files- Dockerfile +8 -0
Dockerfile
CHANGED
@@ -16,5 +16,13 @@ RUN mkdir -p /.cache
|
|
16 |
RUN chmod 777 /.cache
|
17 |
RUN mkdir -p ./gradio_files
|
18 |
RUN chmod 777 ./gradio_files
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
|
20 |
CMD ["pdf2zh", "-i"]
|
|
|
16 |
RUN chmod 777 /.cache
|
17 |
RUN mkdir -p ./gradio_files
|
18 |
RUN chmod 777 ./gradio_files
|
19 |
+
RUN mkdir -p ~/.config
|
20 |
+
RUN chmod 777 ~/.config
|
21 |
+
RUN mkdir -p ~/.config/PDFMathTranslate
|
22 |
+
RUN chmod 777 ~/.config/PDFMathTranslate
|
23 |
+
|
24 |
+
|
25 |
+
# write several lines to the file ~/.config/PDFMathTranslate/config.json
|
26 |
+
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
|
27 |
|
28 |
CMD ["pdf2zh", "-i"]
|