Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
·
bbf7f29
1
Parent(s):
e16e634
fix Dockerfile - load clip-vit-base-patch32 should be after pip install requirements.txt
Browse files- Dockerfile +3 -3
Dockerfile
CHANGED
@@ -10,9 +10,6 @@ RUN apt-get update && apt-get install -y wget
|
|
10 |
WORKDIR /app
|
11 |
COPY . .
|
12 |
|
13 |
-
RUN mkdir -p /models/clip && \
|
14 |
-
python3 -c "from transformers import CLIPModel; CLIPModel.from_pretrained('openai/clip-vit-base-patch32').save_pretrained('/models/clip')"
|
15 |
-
|
16 |
RUN mkdir -p vit_captioning/artifacts && \
|
17 |
wget https://huggingface.co/datasets/ClemSummer/clip-checkpoints/resolve/main/CLIPEncoder_40epochs_unfreeze12.pth \
|
18 |
-O vit_captioning/artifacts/CLIPEncoder_40epochs_unfreeze12.pth
|
@@ -20,4 +17,7 @@ RUN mkdir -p vit_captioning/artifacts && \
|
|
20 |
RUN pip install --upgrade pip
|
21 |
RUN pip install -r requirements.txt
|
22 |
|
|
|
|
|
|
|
23 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|
|
|
10 |
WORKDIR /app
|
11 |
COPY . .
|
12 |
|
|
|
|
|
|
|
13 |
RUN mkdir -p vit_captioning/artifacts && \
|
14 |
wget https://huggingface.co/datasets/ClemSummer/clip-checkpoints/resolve/main/CLIPEncoder_40epochs_unfreeze12.pth \
|
15 |
-O vit_captioning/artifacts/CLIPEncoder_40epochs_unfreeze12.pth
|
|
|
17 |
RUN pip install --upgrade pip
|
18 |
RUN pip install -r requirements.txt
|
19 |
|
20 |
+
RUN mkdir -p /models/clip && \
|
21 |
+
python3 -c "from transformers import CLIPModel; CLIPModel.from_pretrained('openai/clip-vit-base-patch32').save_pretrained('/models/clip')"
|
22 |
+
|
23 |
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]
|