Issue with building docker image

Hi, this is my first time handling Jetson-Nano and Dockerfiles to those kinds of systems.
I;m trying to build a docker image for Jetson-Nano and my program contains ‘numpy’ module.
When trying to run the docker image it throws me an import error -
ImportError: No module named numpy

This is my Dockerfile -

FROM nvcr.io/nvidia/l4t-ml:r32.4.2-py3

WORKDIR /app
COPY . /app

RUN sudo apt-get install python3-pip
RUN sudo apt-get install python3-numpy

ENTRYPOINT [“python”, “app.py”]

Build with -
docker build -t example .
Run with -
docker run -v /some/local/folder:/app/ example

I even tried adding this line and it didn’t help -
RUN pip3 install numpy

Can you spot my mistake and help? Thank you guys!

1 Like

Hi, I have the same question as you. Could you kindly clarify the steps for creating the Dockerfile and building it?
I already pull NVIDIA NGC.
Thanks.

Hi,

Could you try to run apt-get update first?
Thanks.

Thank for answering. Now my Dockerfile looks like this -

FROM nvcr.io/nvidia/l4t-ml:r32.4.2-py3

WORKDIR /app
COPY . /app

RUN sudo apt-get update
RUN sudo apt-get install python3-numpy

ENTRYPOINT [“python”, “app.py”]

And it didn’t work …

Problem solved with replacing

ENTRYPOINT [“python”, “app.py”]

with

ENTRYPOINT [“python3”, “app.py”]