Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +8 -8
Dockerfile
CHANGED
@@ -18,25 +18,25 @@ COPY requirements.txt .
|
|
18 |
|
19 |
RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -r requirements.txt
|
20 |
|
21 |
-
RUN mkdir -p /opt/models && \
|
22 |
export PYTHONDONTWRITEBYTECODE=1 && \
|
23 |
-
huggingface-cli download openai/clip-vit-large-patch14 'model.safetensors' '*.txt' '*.json' --local-dir /opt/models/clip && \
|
24 |
-
huggingface-cli download google-bert/bert-base-chinese 'model.safetensors' '*.txt' '*.json' --local-dir /opt/models/bert && \
|
25 |
huggingface-cli download pk5ls20/PaddleModel 'PaddleOCR2Pytorch/ch_ptocr_v4_det_infer.pth' 'PaddleOCR2Pytorch/ch_ptocr_v4_rec_infer.pth' \
|
26 |
'PaddleOCR2Pytorch/ch_ptocr_mobile_v2.0_cls_infer.pth' 'PaddleOCR2Pytorch/configs/det/ch_PP-OCRv4/ch_PP-OCRv4_det_student.yml' \
|
27 |
-
'PaddleOCR2Pytorch/configs/rec/PP-OCRv4/ch_PP-OCRv4_rec.yml' 'ppocr_keys_v1.txt' --local-dir /opt/models/ocr && \
|
28 |
rm -rf /root/.cache/huggingface
|
29 |
|
30 |
|
31 |
-
ENV APP_MODEL__CLIP
|
32 |
-
ENV APP_MODEL__BERT
|
33 |
-
ENV APP_MODEL__EASYPADDLEOCR
|
34 |
|
35 |
COPY . .
|
36 |
|
37 |
EXPOSE 8000
|
38 |
|
39 |
-
VOLUME ["/opt/NekoImageGallery/static"]
|
40 |
|
41 |
LABEL org.opencontainers.image.authors="EdgeNeko" \
|
42 |
org.opencontainers.image.url="https://github.com/hv0905/NekoImageGallery" \
|
|
|
18 |
|
19 |
RUN PYTHONDONTWRITEBYTECODE=1 pip install --no-cache-dir -r requirements.txt
|
20 |
|
21 |
+
RUN mkdir -p $HOME/opt/models && \
|
22 |
export PYTHONDONTWRITEBYTECODE=1 && \
|
23 |
+
huggingface-cli download openai/clip-vit-large-patch14 'model.safetensors' '*.txt' '*.json' --local-dir $HOME/opt/models/clip && \
|
24 |
+
huggingface-cli download google-bert/bert-base-chinese 'model.safetensors' '*.txt' '*.json' --local-dir $HOME/opt/models/bert && \
|
25 |
huggingface-cli download pk5ls20/PaddleModel 'PaddleOCR2Pytorch/ch_ptocr_v4_det_infer.pth' 'PaddleOCR2Pytorch/ch_ptocr_v4_rec_infer.pth' \
|
26 |
'PaddleOCR2Pytorch/ch_ptocr_mobile_v2.0_cls_infer.pth' 'PaddleOCR2Pytorch/configs/det/ch_PP-OCRv4/ch_PP-OCRv4_det_student.yml' \
|
27 |
+
'PaddleOCR2Pytorch/configs/rec/PP-OCRv4/ch_PP-OCRv4_rec.yml' 'ppocr_keys_v1.txt' --local-dir $HOME/opt/models/ocr && \
|
28 |
rm -rf /root/.cache/huggingface
|
29 |
|
30 |
|
31 |
+
ENV APP_MODEL__CLIP=$HOME/opt/models/clip
|
32 |
+
ENV APP_MODEL__BERT=$HOME/opt/models/bert
|
33 |
+
ENV APP_MODEL__EASYPADDLEOCR=$HOME/opt/models/ocr
|
34 |
|
35 |
COPY . .
|
36 |
|
37 |
EXPOSE 8000
|
38 |
|
39 |
+
VOLUME ["$HOME/opt/NekoImageGallery/static"]
|
40 |
|
41 |
LABEL org.opencontainers.image.authors="EdgeNeko" \
|
42 |
org.opencontainers.image.url="https://github.com/hv0905/NekoImageGallery" \
|