Spaces:
Running
Running
Update Dockerfile
Browse files- Dockerfile +1 -6
Dockerfile
CHANGED
@@ -2,12 +2,6 @@ ARG TORCH_VERSION=2.3.0
|
|
2 |
ARG CUDA_VERSION=12.1
|
3 |
FROM pytorch/pytorch:${TORCH_VERSION}-cuda${CUDA_VERSION}-cudnn8-runtime
|
4 |
|
5 |
-
# Set up a new user named "user" with user ID 1000
|
6 |
-
RUN useradd -m -u 1000 user
|
7 |
-
|
8 |
-
# Switch to the "user" user
|
9 |
-
USER user
|
10 |
-
|
11 |
WORKDIR /opt/NekoImageGallery
|
12 |
|
13 |
COPY requirements.txt .
|
@@ -21,6 +15,7 @@ RUN mkdir -p /opt/models && \
|
|
21 |
huggingface-cli download pk5ls20/PaddleModel 'PaddleOCR2Pytorch/ch_ptocr_v4_det_infer.pth' 'PaddleOCR2Pytorch/ch_ptocr_v4_rec_infer.pth' \
|
22 |
'PaddleOCR2Pytorch/ch_ptocr_mobile_v2.0_cls_infer.pth' 'PaddleOCR2Pytorch/configs/det/ch_PP-OCRv4/ch_PP-OCRv4_det_student.yml' \
|
23 |
'PaddleOCR2Pytorch/configs/rec/PP-OCRv4/ch_PP-OCRv4_rec.yml' 'ppocr_keys_v1.txt' --local-dir /opt/models/ocr && \
|
|
|
24 |
|
25 |
ENV APP_MODEL__CLIP=/opt/models/clip
|
26 |
ENV APP_MODEL__BERT=/opt/models/bert
|
|
|
2 |
ARG CUDA_VERSION=12.1
|
3 |
FROM pytorch/pytorch:${TORCH_VERSION}-cuda${CUDA_VERSION}-cudnn8-runtime
|
4 |
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
WORKDIR /opt/NekoImageGallery
|
6 |
|
7 |
COPY requirements.txt .
|
|
|
15 |
huggingface-cli download pk5ls20/PaddleModel 'PaddleOCR2Pytorch/ch_ptocr_v4_det_infer.pth' 'PaddleOCR2Pytorch/ch_ptocr_v4_rec_infer.pth' \
|
16 |
'PaddleOCR2Pytorch/ch_ptocr_mobile_v2.0_cls_infer.pth' 'PaddleOCR2Pytorch/configs/det/ch_PP-OCRv4/ch_PP-OCRv4_det_student.yml' \
|
17 |
'PaddleOCR2Pytorch/configs/rec/PP-OCRv4/ch_PP-OCRv4_rec.yml' 'ppocr_keys_v1.txt' --local-dir /opt/models/ocr && \
|
18 |
+
rm -rf /root/.cache/huggingface
|
19 |
|
20 |
ENV APP_MODEL__CLIP=/opt/models/clip
|
21 |
ENV APP_MODEL__BERT=/opt/models/bert
|