NanoOwl container doesnt work in r36.4.0

Hi,

I got Nanoowl working im my Orin Nano 15 days ago, but I have to reflash the board using SDK Manager to get MAXN super mode. After that, I follow the instructions on NanoOwl tutorial again and im getting the following error trying to executepython3 tree_demo.py :

FileExistsError: [Errno 17] File exists: '/root/.cache/clip'

Here is the complete log of the error:

kiko@ubuntu:~$ jetson-containers run --workdir /opt/nanoowl $(autotag nanoowl)
Namespace(packages=['nanoowl'], prefer=['local', 'registry', 'build'], disable=[''], user='dustynv', output='/tmp/autotag', quiet=False, verbose=False)
-- L4T_VERSION=36.4.3  JETPACK_VERSION=6.2  CUDA_VERSION=12.6
-- Finding compatible container image for ['nanoowl']
dustynv/nanoowl:r36.4.0
V4L2_DEVICES:  --device /dev/video0  --device /dev/video1  --device /dev/video2  --device /dev/video3 
### DISPLAY environmental variable is already set: ":1"
localuser:root being added to access control list
+ sudo docker run --runtime nvidia -it --rm --network host --shm-size=8g --volume /tmp/argus_socket:/tmp/argus_socket --volume /etc/enctune.conf:/etc/enctune.conf --volume /etc/nv_tegra_release:/etc/nv_tegra_release --volume /tmp/nv_jetson_model:/tmp/nv_jetson_model --volume /var/run/dbus:/var/run/dbus --volume /var/run/avahi-daemon/socket:/var/run/avahi-daemon/socket --volume /var/run/docker.sock:/var/run/docker.sock --volume /home/kiko/data:/data -v /etc/localtime:/etc/localtime:ro -v /etc/timezone:/etc/timezone:ro --device /dev/snd -e PULSE_SERVER=unix:/run/user/1000/pulse/native -v /run/user/1000/pulse:/run/user/1000/pulse --device /dev/bus/usb -e DISPLAY=:1 -v /tmp/.X11-unix/:/tmp/.X11-unix -v /tmp/.docker.xauth:/tmp/.docker.xauth -e XAUTHORITY=/tmp/.docker.xauth --device /dev/video0 --device /dev/video1 --device /dev/video2 --device /dev/video3 --device /dev/i2c-0 --device /dev/i2c-1 --device /dev/i2c-2 --device /dev/i2c-4 --device /dev/i2c-5 --device /dev/i2c-7 --device /dev/i2c-9 --name jetson_container_20250211_155218 --workdir /opt/nanoowl dustynv/nanoowl:r36.4.0
root@ubuntu:/opt/nanoowl# cd examples/tree_demo
python3 tree_demo.py ../../data/owl_image_encoder_patch32.engine
/usr/local/lib/python3.10/dist-packages/transformers/utils/hub.py:128: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.
  warnings.warn(
/usr/local/lib/python3.10/dist-packages/torch/functional.py:534: UserWarning: torch.meshgrid: in an upcoming release, it will be required to pass the indexing argument. (Triggered internally at /opt/pytorch/aten/src/ATen/native/TensorShape.cpp:3595.)
  return _VF.meshgrid(tensors, **kwargs)  # type: ignore[attr-defined]
[02/11/2025-15:52:35] [TRT] [W] Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors.
Traceback (most recent call last):
  File "/opt/nanoowl/examples/tree_demo/tree_demo.py", line 47, in <module>
    predictor = TreePredictor(
  File "/opt/nanoowl/nanoowl/tree_predictor.py", line 52, in __init__
    self.clip_predictor = ClipPredictor() if clip_predictor is None else clip_predictor
  File "/opt/nanoowl/nanoowl/clip_predictor.py", line 65, in __init__
    self.clip_model, _ = clip.load(model_name, device)
  File "/usr/local/lib/python3.10/dist-packages/clip/clip.py", line 120, in load
    model_path = _download(_MODELS[name], download_root or os.path.expanduser("~/.cache/clip"))
  File "/usr/local/lib/python3.10/dist-packages/clip/clip.py", line 44, in _download
    os.makedirs(root, exist_ok=True)
  File "/usr/lib/python3.10/os.py", line 225, in makedirs
    mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/root/.cache/clip'

Its possible that last version of NanoOwl stopped working?

Hi,

The error occurs when it tries to download a file to the cache folder as the file is existed already.
Could you try to clean the cache to see if it can work?

Thanks.

Hi,

I tried. Im new to linux, maybe its the wrong folder.

Hi,

Please find the path inside of the container (different directories can be mounted when launching a container).
For example, before running tree_demo.py, please try the command below:

$ sudo rm /root/.cache/clip

Thanks.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.