when x86_linux cross complie to arm_linux,it occur a error

When I build a docker for creat a cross complie env.docker occur a error like:
Step 6/15 : COPY docker/jetpack_files /pdk_files
COPY failed: stat /mnt/data_c/docker/tmp/docker-builder505941549/docker/jetpack_files: no such file or directory

I use the command:
docker build -f docker/ubuntu-18.04-cross-aarch64.Dockerfile --build-arg CUDA_VERSION=10.0 --tag=tensorrt .

My docker come from https://github.com/NVIDIA/TensorRT/blob/master/docker/ubuntu-18.04-cross-aarch64.Dockerfile

Its content is:
FROM nvidia/cuda:10.0-devel-ubuntu18.04

LABEL maintainer=“NVIDIA CORPORATION”

Install requried libraries

RUN apt-get update && apt-get install -y --no-install-recommends
libcurl4-openssl-dev
wget
zlib1g-dev
git
pkg-config
python3
python3-pip

RUN cd /usr/local/bin &&
ln -s /usr/bin/python3 python &&
ln -s /usr/bin/pip3 pip

Install Cmake

RUN cd /tmp &&
wget https://github.com/Kitware/CMake/releases/download/v3.14.4/cmake-3.14.4-Linux-x86_64.sh &&
chmod +x cmake-3.14.4-Linux-x86_64.sh &&
./cmake-3.14.4-Linux-x86_64.sh --prefix=/usr/local --exclude-subdir --skip-license &&
rm ./cmake-3.14.4-Linux-x86_64.sh

COPY docker/jetpack_files /pdk_files
COPY scripts/stubify.sh /pdk_files

Install CUDA cross compile toolchain

RUN dpkg -i /pdk_files/cuda-repo-cross-aarch64-10-0-local-10.0.326_1.0-1_all.deb /pdk_files/cuda-repo-ubuntu1804-10-0-local-10.0.326-410.108_1.0-1_amd64.deb
&& apt-get update
&& apt-get install -y cuda-cross-aarch64
&& rm -rf /var/lib/apt/lists/*

Unpack cudnn

RUN dpkg -x /pdk_files/libcudnn7_7.5.0.56-1+cuda10.0_arm64.deb /pdk_files/cudnn
&& dpkg -x /pdk_files/libcudnn7-dev_7.5.0.56-1+cuda10.0_arm64.deb /pdk_files/cudnn
&& cd /pdk_files/cudnn/usr/include/aarch64-linux-gnu
&& cd /pdk_files/cudnn/usr/lib/aarch64-linux-gnu
&& ln -s libcudnn.so.7 libcudnn.so
&& cd /pdk_files/cudnn
&& ln -s usr/include/aarch64-linux-gnu include
&& ln -s usr/lib/aarch64-linux-gnu lib \
&& ln -s /pdk_files/cudnn/usr/include/aarch64-linux-gnu/cudnn_v7.h /usr/include/cudnn.h

Unpack libnvinfer

RUN dpkg -x /pdk_files/libnvinfer6_6.0.1-1+cuda10.0_arm64.deb /pdk_files/tensorrt
&& dpkg -x /pdk_files/libnvinfer-dev_6.0.1-1+cuda10.0_arm64.deb /pdk_files/tensorrt
&& dpkg -x /pdk_files/libnvparsers6_6.0.1-1+cuda10.0_arm64.deb /pdk_files/tensorrt
&& dpkg -x /pdk_files/libnvparsers-dev_6.0.1-1+cuda10.0_arm64.deb /pdk_files/tensorrt
&& dpkg -x /pdk_files/libnvinfer-plugin6_6.0.1-1+cuda10.0_arm64.deb /pdk_files/tensorrt
&& dpkg -x /pdk_files/libnvinfer-plugin-dev_6.0.1-1+cuda10.0_arm64.deb /pdk_files/tensorrt
&& dpkg -x /pdk_files/libnvonnxparsers6_6.0.1-1+cuda10.0_arm64.deb /pdk_files/tensorrt
&& dpkg -x /pdk_files/libnvonnxparsers-dev_6.0.1-1+cuda10.0_arm64.deb /pdk_files/tensorrt

create stub libraries

RUN cd /pdk_files/tensorrt
&& ln -s usr/include/aarch64-linux-gnu include
&& ln -s usr/lib/aarch64-linux-gnu lib
&& cd lib
&& mkdir stubs
&& for x in nvinfer nvparsers nvinfer_plugin nvonnxparser;
do
CC=aarch64-linux-gnu-gcc /pdk_files/stubify.sh lib${x}.so stubs/lib${x}.so
; done

Set environment and working directory

ENV TRT_RELEASE /pdk_files/tensorrt
ENV TRT_SOURCE /workspace/TensorRT
WORKDIR /workspace

RUN ["/bin/bash"]

Hi,

Please noticed that this Dockefile should be executed on an x86 environment.
Are you trying to build it on the TX2?

Thanks.

Hi AastaLLL
I run it on my X86 PC and my target platform is TX2(ARMV8)
The file scripts/stubify.sh it is not in the current github repository (https://github.com/NVIDIA/TensorRT.git)

Hi,

This is a known issue.

We are checking the status of stubify.sh with our internal team.
Will update more information here once we got a feedback.

Thanks.

Hi,

Please find the attachment for the script.
Remember to fix the naming back to stubify.sh (limitation to attach a file here)

Thanks.
stubify.sh.txt (907 Bytes)