We are running jet pack 6.0. Trying build a custom container with the following docker file,
Docker file
FROM dustynv/nano_llm:humble-r36.3.0
ENV DEBIAN_FRONTEND=noninteractive
Set the LD_LIBRARY_PATH environment variable
ENV LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu/nvidia:$LD_LIBRARY_PATH
Install system dependencies
RUN apt-get update && apt-get install -y --no-install-recommends
libportaudio2
libasound2-dev
pulseaudio
alsa-utils
libsdl2-dev
libsdl2-mixer-2.0-0
portaudio19-dev
git
&& rm -rf /var/lib/apt/lists/*Install additional Python dependencies
RUN pip3 install --no-cache-dir --ignore-installed
python-dotenv
websockets
pygame
termcolor
pyaudioSet the working directory for your application
WORKDIR /app
Create logs directory
RUN mkdir -p /app/logs && chmod 777 /app/logs
Copy your Python scripts into the container
COPY nano-llm-detection.py audio_manager.py websocket_server.py .env ./
Set the entrypoint to run your script
ENTRYPOINT [“python3”, “nano-llm-detection.py”]
The build is successful. But When I try to run the image with the command,
docker run --runtime nvidia
–network host
–device /dev/video0:/dev/video0
–device /dev/snd:/dev/snd
-v /home/checkout/Downloads/detections/.env:/app/.env
-v /home/checkout/media/background_music:/app/media/background
-v /home/checkout/media/greetings:/app/media/store
-v /tmp/.X11-unix:/tmp/.X11-unix
-v /run/user/$(id -u)/pulse:/run/pulse
-e DISPLAY=$DISPLAY
-e PULSE_SERVER=unix:/run/pulse/native
–group-add $(getent group audio | cut -d: -f3)
–user $(id -u):$(id -g)
custom-nano-llm-detection:latest
Im getting this following module import error.
Traceback (most recent call last):
File “/app/nano-llm-detection.py”, line 18, in
from nano_llm import NanoLLM, ChatHistory, remove_special_tokens
File “/opt/NanoLLM/nano_llm/init.py”, line 2, in
from .nano_llm import NanoLLM
File “/opt/NanoLLM/nano_llm/nano_llm.py”, line 15, in
from .vision import CLIPVisionModel, TIMMVisionModel, MMProjector
File “/opt/NanoLLM/nano_llm/vision/init.py”, line 3, in
from .clip import CLIPVisionModel, TIMMVisionModel
File “/opt/NanoLLM/nano_llm/vision/clip.py”, line 3, in
from clip_trt import CLIPVisionModel, TIMMVisionModel
ModuleNotFoundError: No module named ‘clip_trt’
This section of the import statements was copied directly from vision/video.py example. I would think that dustynv/nano_llm:humble-r36.3.0 would already have the needed modules like clip_trt. Why am i still geting this import failure error?