This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

SK-TDA4VM: building error in docker

Part Number: SK-TDA4VM

Hello Ti,

I refer the instruction from https://github.com/TexasInstruments/edgeai-tidl-tools/tree/master/dockers/J721E/ubuntu_20.04 

After I run the instruction with docker_build.sh, it occurs following error

./docker_build.sh
Sending build context to Docker daemon  26.11kB
Step 1/16 : ARG REPO_LOCATION='arm64v8'
Step 2/16 : FROM ${REPO_LOCATION}ubuntu:20.04 as edgeai_tidl_tools_u20
 ---> 7ace790b8bce
Step 3/16 : ARG DEBIAN_FRONTEND=noninteractive
 ---> Using cache
 ---> 077cb443993b
Step 4/16 : ARG NPROC=1
 ---> Using cache
 ---> 927bef317865
Step 5/16 : ARG PROJECT_NAME=edgeai_tidl_tools_u20
 ---> Using cache
 ---> 3e75c4ce6b68
Step 6/16 : ENV USE_PROXY=ti
 ---> Using cache
 ---> b473e31e13fc
Step 7/16 : ADD entrypoint.sh setup_proxy.sh  /usr/bin/
 ---> Using cache
 ---> badc79fce159
Step 8/16 : RUN /usr/bin/setup_proxy.sh
 ---> [Warning] The requested image's platform (linux/arm64/v8) does not match the detected host platform (linux/amd64) and no specific platform was requested
 ---> Running in ef94e1cdfaee
exec /bin/sh: exec format error
The command '/bin/sh -c /usr/bin/setup_proxy.sh' returned a non-zero code: 1

How to fix the error about "exec /bin/sh: exec format error"?

BR

James

  • Hi James,

    Apologies for the delayed reply. The Dockerfile was designed for running only on the SK-TDA4VM board, and not for PC. Can you confirm that the docker_build.sh script was ran on the SK-TDA4VM board?

    And can you share logs from "hostnamectl" so that we can see what OS, kernel, and architecture is being detected?

    Regards,

    Takuma

  • Hi Takuma,

    Thank you for your reply. I run the docker_build.sh with different version of ubuntu. Following are the result:

    root@tda4vm-sk:~/edgeai-tidl-tools/dockers/J721E/ubuntu_18.04# ./docker_build.sh
    Sending build context to Docker daemon  27.14kB
    Step 1/18 : ARG REPO_LOCATION='arm64v8'
    Step 2/18 : FROM ${REPO_LOCATION}ubuntu:18.04 as edgeai_tidl_tools_u18
     ---> c1adc1968c7b
    Step 3/18 : ARG DEBIAN_FRONTEND=noninteractive
     ---> Using cache
     ---> 607eefe811a4
    Step 4/18 : ARG NPROC=1
     ---> Using cache
     ---> 91dbd0d6bab2
    Step 5/18 : ARG PROJECT_NAME=edgeai_tidl_tools_u18
     ---> Using cache
     ---> 438b9dcff780
    Step 6/18 : ENV USE_PROXY=ti
     ---> Using cache
     ---> f83bd2da5d87
    Step 7/18 : ADD entrypoint.sh setup_proxy.sh  /usr/bin/
     ---> Using cache
     ---> bbeee5c1ff00
    Step 8/18 : RUN /usr/bin/setup_proxy.sh
     ---> Using cache
     ---> 23d25ee39b41
    Step 9/18 : RUN apt-get update -y && apt-get dist-upgrade -y && apt-get install -y     glib-2.0-dev     ncurses-dev
     ---> Running in d25ab7c7f436
    Err:1 http://ports.ubuntu.com/ubuntu-ports bionic InRelease
      Could not connect to 192.91.66.131:80 (192.91.66.131), connection timed out
    Err:2 http://ports.ubuntu.com/ubuntu-ports bionic-updates InRelease
      Unable to connect to 192.91.66.131:80:
    Err:3 http://ports.ubuntu.com/ubuntu-ports bionic-backports InRelease
      Unable to connect to 192.91.66.131:80:
    Err:4 http://ports.ubuntu.com/ubuntu-ports bionic-security InRelease
      Unable to connect to 192.91.66.131:80:
    Reading package lists...
    W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic/InRelease  Could not connect to 192.91.66.131:80 (192.91.66.131), connection timed out
    W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-updates/InRelease  Unable to connect to 192.91.66.131:80:
    W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-backports/InRelease  Unable to connect to 192.91.66.131:80:
    W: Failed to fetch http://ports.ubuntu.com/ubuntu-ports/dists/bionic-security/InRelease  Unable to connect to 192.91.66.131:80:
    W: Some index files failed to download. They have been ignored, or old ones used instead.
    Reading package lists...
    Building dependency tree...
    Reading state information...
    Calculating upgrade...
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    Reading package lists...
    Building dependency tree...
    Reading state information...
    E: Unable to locate package glib-2.0-dev
    E: Couldn't find any package by glob 'glib-2.0-dev'
    E: Couldn't find any package by regex 'glib-2.0-dev'
    E: Unable to locate package ncurses-dev
    The command '/bin/sh -c apt-get update -y && apt-get dist-upgrade -y && apt-get install -y     glib-2.0-dev     ncurses-dev' returned a non-zero code: 100
    

    BR 

    James

  • Hi James,

    I think this is an issue with setting the environment variable in the Dockerfile to use our company proxy - an artifact from development.

    Could you try removing the line in the Dockerfile which sets "ENV USE_PROXY=ti": https://github.com/TexasInstruments/edgeai-tidl-tools/blob/master/dockers/J721E/ubuntu_20.04/Dockerfile#L37

    The same can be done on 18.04 as well.

    Regards,

    Takuma