Unable to pull Docker python image in Torizon environment

Description: I’m facing an issue while pulling a Docker image in my Torizon environment. Validation is successful, but I encounter a timeout error during the pull. I’m using Ubuntu 22.04 and successfully completed all the previous steps in the quick start

Steps Performed:

  1. Validated environment successfully.
  2. Ran various tasks, including updating Python packages and building Docker images.
  3. Successfully pushed Docker image to a registry.
  4. Error encountered during Docker image pull:
⚠️ VALIDATING ENVIRONMENT


✅ Environment is valid!

 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: bash -c [[ ! -z "192.168.93.17" ]] && true || false 

 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: bash -c [[ "aarch64" == "aarch64" ]] && true || false 

 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: [ $(/bin/python3 -m pip --version | awk '{print $2}' | cut -d'.' -f1) -lt 23 ] && /bin/python3 -m pip install --upgrade pip || true 

 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: /bin/python3 -m pip install --break-system-packages -r requirements-debug.txt 

Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: debugpy in /home/itk/.local/lib/python3.10/site-packages (from -r requirements-debug.txt (line 1)) (1.8.0)
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: sleep 1 

 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: sshpass -p doanhoang2001 scp -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /home/itk/test/docker-compose.yml torizon@192.168.93.17:~/ 

Warning: Permanently added '192.168.93.17' (ED25519) to the list of known hosts.
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: sshpass -p doanhoang2001 ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no torizon@192.168.93.17 LOCAL_REGISTRY=192.168.66.52 TAG=arm64 GPU=-vivante docker-compose down --remove-orphans 

Warning: Permanently added '192.168.93.17' (ED25519) to the list of known hosts.
Found multiple config files with supported names: docker-compose.yml, docker-compose.yaml
Using docker-compose.yml

Removing network torizon_default
Network torizon_default not found.
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: DOCKER_HOST= docker compose build --pull --build-arg SSHUSERNAME=torizon --build-arg APP_ROOT=/home/torizon --build-arg IMAGE_ARCH=arm64 --build-arg SSH_DEBUG_PORT=6502 --build-arg GPU=-vivante test_python-debug 

[+] Building 1.0s (14/14) FINISHED                                                                                                                      docker:desktop-linux
 => [test_python-debug internal] load .dockerignore                                                                                                                     0.0s
 => => transferring context: 117B                                                                                                                                       0.0s
 => [test_python-debug internal] load build definition from Dockerfile.debug                                                                                            0.0s
 => => transferring dockerfile: 2.85kB                                                                                                                                  0.0s
 => [test_python-debug internal] load metadata for docker.io/torizon/debian:3.0.8-bookworm                                                                              1.0s
 => [test_python-debug 1/9] FROM docker.io/torizon/debian:3.0.8-bookworm@sha256:670aa4be3de68338e9dc5bf740f34079343199038fc06ab8f6d0ad4482a66aa8                        0.0s
 => [test_python-debug internal] load build context                                                                                                                     0.0s
 => => transferring context: 104B                                                                                                                                       0.0s
 => CACHED [test_python-debug 2/9] RUN apt-get -q -y update &&     apt-get -q -y install     openssl     openssh-server     rsync     file     screen     python3-mini  0.0s
 => CACHED [test_python-debug 3/9] RUN apt-get -q -y update &&     apt-get -q -y install     &&     apt-get clean && apt-get autoremove &&     rm -rf /var/lib/apt/lis  0.0s
 => CACHED [test_python-debug 4/9] RUN python3 -m venv /home/torizon/.venv --system-site-packages                                                                       0.0s
 => CACHED [test_python-debug 5/9] COPY requirements-debug.txt /requirements-debug.txt                                                                                  0.0s
 => CACHED [test_python-debug 6/9] RUN . /home/torizon/.venv/bin/activate &&     pip3 install --upgrade pip && pip3 install --break-system-packages -r requirements-de  0.0s
 => CACHED [test_python-debug 7/9] COPY .conf/id_rsa.pub /id_rsa.pub                                                                                                    0.0s
 => CACHED [test_python-debug 8/9] RUN mkdir /var/run/sshd &&     sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g'         -i /etc/pam.  0.0s
 => CACHED [test_python-debug 9/9] RUN rm -r /etc/ssh/ssh*key &&     dpkg-reconfigure openssh-server                                                                    0.0s
 => [test_python-debug] exporting to image                                                                                                                              0.0s
 => => exporting layers                                                                                                                                                 0.0s
 => => writing image sha256:4992acc942f2156696d67d5b2dbc3a391a2b937c63d5174c162a3788272e9f23                                                                            0.0s
 => => naming to localhost:5002/test_python-debug:arm64                                                                                                                 0.0s
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: DOCKER_HOST= docker compose push test_python-debug 

[+] Pushing 0/0
 ⠋ Pushing test_python-debug: 6b1eba09b9be Layer already exists                                                                                                         0.0s 
 ⠋ Pushing test_python-debug: 5a0a783e7434 Layer already exists                                                                                                         0.0s 
 ⠋ Pushing test_python-debug: a17e8384309e Layer already exists                                                                                                         0.0s 
 ⠋ Pushing test_python-debug: c6e0a83fd0a0 Layer already exists                                                                                                         0.0s 
 ⠋ Pushing test_python-debug: 13e1ca2d4cb4 Layer already exists                                                                                                         0.0s 
 ⠋ Pushing test_python-debug: 287265993a4e Layer already exists                                                                                                         0.0s 
 ⠋ Pushing test_python-debug: 2c26556f0c79 Layer already exists                                                                                                         0.0s 
 ⠋ Pushing test_python-debug: 635ed82b6505 Layer already exists                                                                                                         0.0s 
 ⠋ Pushing test_python-debug: 4c50a19f8fcc Layer already exists                                                                                                         0.0s 
 ⠋ Pushing test_python-debug: 7c007edd8529 Layer already exists                                                                                                         0.0s 
 ⠋ Pushing test_python-debug: 63d3cbaa06e8 Layer already exists                                                                                                         0.0s 
 ⠋ Pushing test_python-debug: 3a04de9defd8 Layer already exists                                                                                                         0.0s 
 ⠋ Pushing test_python-debug: 808abb4ec6b7 Layer already exists                                                                                                         0.0s 
 ⠋ Pushing test_python-debug: 6edd23fe0288 Layer already exists                                                                                                         0.0s 
 ⠋ Pushing test_python-debug: f605685cd852 Layer already exists                                                                                                         0.0s 
 ⠋ Pushing test_python-debug: 1b5413bc7576 Layer already exists                                                                                                         0.0s 
 ⠋ Pushing test_python-debug: 180553c49462 Layer already exists                                                                                                         0.0s 
 ⠋ Pushing test_python-debug: 333e365b81b3 Layer already exists                                                                                                         0.0s 
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: sshpass -p doanhoang2001 ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no torizon@192.168.93.17 LOCAL_REGISTRY=192.168.66.52 TAG=arm64 docker-compose pull test_python-debug 

Warning: Permanently added '192.168.93.17' (ED25519) to the list of known hosts.
Found multiple config files with supported names: docker-compose.yml, docker-compose.yaml
Using docker-compose.yml

Pulling test_python-debug ... 
Pulling test_python-debug ... error

ERROR: for test_python-debug  Get "http://192.168.66.52:5002/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
Get "http://192.168.66.52:5002/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

 *  The terminal process "sshpass '-p', 'doanhoang2001', 'ssh', '-o', 'UserKnownHostsFile=/dev/null', '-o', 'StrictHostKeyChecking=no', 'torizon@192.168.93.17', 'LOCAL_REGISTRY=192.168.66.52 TAG=arm64 docker-compose pull test_python-debug'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

i did not change anything in the docker-compose.yml. The SoM and my computers are connected with ssh. Any guidance would be appreciated, thank you!

1 Like

Hi @hoangledoan ,

This issue looks to be related to either your network configuration or the Docker daemon running on your development PC. Is the PC and the SoM on the same local network?

Can you check if 192.168.66.52 is the IP for your development PC that is in the same local network as the SoM?

On the SoM, can you try pulling the debug container image manually i.e. via the docker pull command, similar to this example:

docker pull 192.168.66.52:5002/test_python-debug:arm64

Change the IP address if necessary.

Best regards,
Lucas Akira

Hi @lucas_a.tx ,

I always have trouble with Docker daemon, as I understand, when I start the Docker engine, it will connect with the Docker daemon, is that correct?

Also if the torizon extension on vscode doesn’t work for me, will pulling from local server has any side effect that makes the code doesn’t work?

I’m sorry I’m just very new to this domain :frowning: Thanks for your help!

Hi @hoangledoan ,

In a simplified way yes, if you start Docker, it should start the daemon. Usually after installing Docker Engine on your development PC you should check if its systemd service is running normally:

systemctl status docker

And to answer the second question: making the board pull the image from the local registry is actually what the extension was trying to do in order to prepare for the debug session.

You can see from the logs that the extension connected to your board and from it, it tried to pull the debug image with docker-compose pull test_python-debug.

The docker pull command I referenced would try to do the same thing. So no, it wouldn’t cause side effects, I suggested trying to use it to see if the issue happens there as well.


I think the issue is probably more related to your local network.

Did you check the IP address of your development PC? Is it connected to more than one local network e.g. Wi-Fi and Ethernet?

In your project folder there is a file in .vscode/ called settings.json. In there you can manually set the development PC IP (host_ip) to be used and the board IP (torizon_ip). Both addresses should refer to the same local network.

Best regards,
Lucas Akira