dusty-nv / jetson-containers

Machine Learning Containers for NVIDIA Jetson and JetPack-L4T
MIT License
2.18k stars 446 forks source link

nanoowl container downloads /root/.cache/clip/ViT-B-32.pt everytime #454

Closed TadayukiOkada closed 4 months ago

TadayukiOkada commented 6 months ago

The ViT model file is not included in the docker image, so it will be downloaded when tree_demo is started. I modified the Dockerfile as follows so that the created image contains the ViT model file:

diff --git a/packages/vit/nanoowl/Dockerfile b/packages/vit/nanoowl/Dockerfile
index 1254f00..c0b40e9 100644
--- a/packages/vit/nanoowl/Dockerfile
+++ b/packages/vit/nanoowl/Dockerfile
@@ -40,6 +40,9 @@ RUN cd /opt/nanoowl/examples/ && \
         --threshold=0.1 \
         --image_encoder_engine=../data/owl_image_encoder_patch32.engine

+RUN cd /opt/nanoowl/examples/ && \
+    python3 tree_predict.py
+
 COPY benchmark.py /opt/nanoowl/

-WORKDIR /opt/nanoowl
\ No newline at end of file
+WORKDIR /opt/nanoowl