Jetson container vlm No such file or directory

Trying to follow the demo of nano vlm (NanoVLM - NVIDIA Jetson AI Lab)

sudo jetson-containers run $(autotag nano_llm) python3 -m nano_llm.chat --api=mlc --model Efficient-Large-Model/VILA1.5-3b --max-context-len 256 --max-new-tokens 32 --prompt ‘/home/user/Desktop/Hoover.jpg’ --prompt ‘what kind of environment is it?’ --prompt ‘please describe the scene.’ --prompt ‘are there any hazards to be aware of?’

but get
File “/usr/lib/python3.10/runpy.py”, line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.10/runpy.py”, line 86, in _run_code
exec(code, run_globals)
File “/opt/NanoLLM/nano_llm/chat/main.py”, line 82, in
embedding, position = chat_history.embed_chat(
File “/opt/NanoLLM/nano_llm/chat/history.py”, line 369, in embed_chat
embeddings.append(msg.embed())
File “/opt/NanoLLM/nano_llm/chat/message.py”, line 215, in embed
self._embed_image(self.history.model, split_template, return_tensors=return_tensors, **kwargs)
File “/opt/NanoLLM/nano_llm/chat/message.py”, line 256, in _embed_image
image_embeds = model.embed_image(self.content, return_tensors=return_tensors)
File “/opt/NanoLLM/nano_llm/nano_llm.py”, line 266, in embed_image
embedding = vision(
File “/opt/clip_trt/clip_trt/vision.py”, line 246, in call
return self.embed_image(image, **kwargs)
File “/opt/clip_trt/clip_trt/vision.py”, line 195, in embed_image
image = load_image(image)
File “/opt/clip_trt/clip_trt/utils/image.py”, line 66, in load_image
image = PIL.Image.open(path).convert(‘RGB’)
File “/usr/lib/python3/dist-packages/PIL/Image.py”, line 2953, in open
fp = builtins.open(filename, “rb”)
FileNotFoundError: [Errno 2] No such file or directory: ‘/home/ailab/Desktop/Hoover.jpg’

I can do with /jetson-containers/data/images, but I want to do with my local data
How can I connect(or access) local file on the container condition?

Hi @jksim1833, your jetson-containers/data directory is automatically mounted into the container under /data, so any files you put under there will show up in the container and vice versa.

If you would like to mount additional directories of your choosing in the container, use the -v or --volume flag when you start the container:

jetson-containers run -v /home/ailab:/home/ailab $(autotag nano_llm)

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