I am trying to create a docker build in Xavier. When I run my piece of code without docker it works smooth and I got The CUDA compiler identification. But when I am trying to make a build with dockerfile it gave me an error of CUDA compiler identification is unknown.
Below is my dockerfile steps:
FROM nvcr.io/nvidia/l4t-base:r32.3.1
RUN apt-get update && apt-get install -y --no-install-recommends make g++ && apt-get install -y cmake gcc libopenblas-dev build-essential
WORKDIR /home/username/docker_fc/tensorrt_l2norm_helper
CMD ["python3", "./step01_pb_to_uff.py"]
COPY . /home/username/docker_fc/
RUN cmake --version
RUN nvcc --version
RUN mkdir build && cd build && pwd && cmake .. && make
I got error in the last step with cmake.
my mvcc version is release 10.0, V10.0.326. my cmake version is 3.10.2
Can anyone tell me what is missing in Dockerfile?
The base image of l4t does not load the runtime components of nvidia by default. They only have the stubs. If you want to do this, you will need to enable the default-runtime nvidia in the /etc/docker/daemon.json file. This will load all the runtime components such as nvcc.
{
"default-runtime": "nvidia",
"runtimes": {
"nvidia": {
"path": "/usr/bin/nvidia-container-runtime",
"runtimeArgs": []
}
},
}
Just take note that if you do this, the size of your built docker will be larger