Help with first TorizonOS C# application debug deploy

Hi.

We are currently testing how to migrate our products that uses Toradex’s SoC from WinCE 7 to TorizonOS but using a different hardware (currently, our products uses imx6dl512it and iris carrier board), as described in tdx-info:

Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           5.4.193-5.7.2+git.b60d3160fd04 #1-TorizonCore SMP PREEMPT Fri Dec 23 15:47:24 UTC 2022
Kernel command line:      root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.1/torizon/d059ab4068a8626b311cab9118926b3f41ed3a2a6874c501225e9e8a1ef84f88/0
Distro name:              NAME="TorizonCore"
Distro version:           VERSION_ID=5.7.2-build.20
Distro variant:           VARIANT="Docker"
Hostname:                 verdin-imx8mp-15005962
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Verdin iMX8M Plus WB on Verdin Development Board
Toradex version:          0058 V1.1A
Serial number:            15005962
Processor arch:           aarch64
------------------------------------------------------------

By using the Quick start guide we setup our environment and the board and trying to put a test application in C# to run.

In the url Visual Studio Code IDE Extension, we managed to get to item 4 Remote Debug and Deploy Projects but failed to run this test application.

My computer is a Win11 Pro with WSL2 already installed. I have installed Ubuntu 22.04 (WSL) as it stated as compatible with the Torizon IDE Extension and installed the Docker engine inside this ubuntu following the instructions on the link above.

When trying to debug this test application I get the message of compose is not a docker command.

 *  Executing task: pwsh -nop .conf/validateDepsRunning.ps1 


⚠️ VALIDATING ENVIRONMENT


✅ Environment is valid!

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

 *  Executing task: bash -c [[ ! -z "192.168.50.54" ]] && 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: sleep 1 

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

 *  Executing task: sshpass -p 123456 scp -P 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /home/rafael/teste/docker-compose.yml torizon@192.168.50.54:~/ 

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

 *  Executing task: DOCKER_HOST=192.168.50.54:2375 docker image prune -f --filter=dangling=true 

Total reclaimed space: 0B
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: if [ false == false ]; then DOCKER_HOST=192.168.50.54:2375 docker compose -p torizon down --remove-orphans ; fi 

Warning: No resource found to remove for project "torizon".
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: dotnet publish /home/rafael/teste/teste.csproj /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary -c Debug -r linux-arm64 --no-self-contained 

  Determining projects to restore...
  All projects are up-to-date for restore.
  teste -> /home/rafael/teste/bin/Debug/net8.0/linux-arm64/teste.dll
  teste -> /home/rafael/teste/bin/Debug/net8.0/linux-arm64/publish/
 *  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/app --build-arg IMAGE_ARCH=arm64 --build-arg SSH_DEBUG_PORT=2222 --build-arg GPU=-vivante teste-debug 

WARN[0000] The "DOCKER_LOGIN" variable is not set. Defaulting to a blank string. 
WARN[0000] /home/rafael/teste/docker-compose.yml: `version` is obsolete 
[+] Building 1.3s (12/12) FINISHED                                                                                                                                                                                                                            docker:default
 => [teste-debug internal] load build definition from Dockerfile.debug                                                                                                                                                                                                  0.0s
 => => transferring dockerfile: 2.67kB                                                                                                                                                                                                                                  0.0s
 => [teste-debug internal] load metadata for docker.io/torizon/dotnet-debug:3.1.0-8.0.2                                                                                                                                                                                 1.2s
 => [teste-debug internal] load .dockerignore                                                                                                                                                                                                                           0.0s
 => => transferring context: 56B                                                                                                                                                                                                                                        0.0s
 => [teste-debug 1/7] FROM docker.io/torizon/dotnet-debug:3.1.0-8.0.2@sha256:f0a444f8f43fc73f2a24509d7bea00ce0dbdc259e79fa86fbb9f0ffaa88aa287                                                                                                                           0.0s
 => [teste-debug internal] load build context                                                                                                                                                                                                                           0.0s
 => => transferring context: 603B                                                                                                                                                                                                                                       0.0s
 => CACHED [teste-debug 2/7] RUN apt-get -q -y update &&     apt-get -q -y install     openssl     openssh-server     rsync     file &&     apt-get clean && apt-get autoremove &&     rm -rf /var/lib/apt/lists/*                                                      0.0s
 => CACHED [teste-debug 3/7] RUN apt-get -q -y update &&     apt-get -q -y install     &&     apt-get clean && apt-get autoremove &&     rm -rf /var/lib/apt/lists/*                                                                                                    0.0s
 => CACHED [teste-debug 4/7] COPY .conf/id_rsa.pub /id_rsa.pub                                                                                                                                                                                                          0.0s
 => CACHED [teste-debug 5/7] RUN mkdir /var/run/sshd &&     sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g'         -i /etc/pam.d/sshd &&     if test torizon != root ;         then mkdir -p /home/torizon/.ssh ;         else mkdir   0.0s
 => CACHED [teste-debug 6/7] RUN rm -r /etc/ssh/ssh*key &&     dpkg-reconfigure openssh-server                                                                                                                                                                          0.0s
 => CACHED [teste-debug 7/7] COPY --chown=torizon:torizon ./bin/Debug/net8.0/linux-arm64/publish /home/torizon/app                                                                                                                                                      0.0s
 => [teste-debug] exporting to image                                                                                                                                                                                                                                    0.0s
 => => exporting layers                                                                                                                                                                                                                                                 0.0s
 => => writing image sha256:adf951cddb1e1e94f8f14d011cf6c6ebec39d94a6e45e4620b655e4d1a837732                                                                                                                                                                            0.0s
 => => naming to localhost:5002/teste-debug:arm64                                                                                                                                                                                                                       0.0s
 *  Terminal will be reused by tasks, press any key to close it. 

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

WARN[0000] The "DOCKER_LOGIN" variable is not set. Defaulting to a blank string. 
WARN[0000] /home/rafael/teste/docker-compose.yml: `version` is obsolete 
[+] Pushing 20/0
 ✔ Pushing localhost:5002/teste-debug:arm64: ce1ec5f7bed5 Layer already exists                                                                                                                                                                                          0.0s 
 ✔ Pushing localhost:5002/teste-debug:arm64: 70f5203fbc20 Layer already exists                                                                                                                                                                                          0.0s 
 ✔ Pushing localhost:5002/teste-debug:arm64: 9312604d10a7 Layer already exists                                                                                                                                                                                          0.0s 
 ✔ Pushing localhost:5002/teste-debug:arm64: 54df73e1c4ac Layer already exists                                                                                                                                                                                          0.0s 
 ✔ Pushing localhost:5002/teste-debug:arm64: dc2c2e1afdeb Layer already exists                                                                                                                                                                                          0.0s 
 ✔ Pushing localhost:5002/teste-debug:arm64: ab2f95249a4e Layer already exists                                                                                                                                                                                          0.0s 
 ✔ Pushing localhost:5002/teste-debug:arm64: fef73bf99ab8 Layer already exists                                                                                                                                                                                          0.0s 
 ✔ Pushing localhost:5002/teste-debug:arm64: 463b19d44a48 Layer already exists                                                                                                                                                                                          0.0s 
 ✔ Pushing localhost:5002/teste-debug:arm64: 4763d0cdf413 Layer already exists                                                                                                                                                                                          0.0s 
 ✔ Pushing localhost:5002/teste-debug:arm64: cef0e15acf1a Layer already exists                                                                                                                                                                                          0.0s 
 ✔ Pushing localhost:5002/teste-debug:arm64: 6134c82ffb64 Layer already exists                                                                                                                                                                                          0.0s 
 ✔ Pushing localhost:5002/teste-debug:arm64: 9cc95b1f72aa Layer already exists                                                                                                                                                                                          0.0s 
 ✔ Pushing localhost:5002/teste-debug:arm64: 4ab83384118e Layer already exists                                                                                                                                                                                          0.0s 
 ✔ Pushing localhost:5002/teste-debug:arm64: 5b9562007155 Layer already exists                                                                                                                                                                                          0.0s 
 ✔ Pushing localhost:5002/teste-debug:arm64: 7318ab26a104 Layer already exists                                                                                                                                                                                          0.0s 
 ✔ Pushing localhost:5002/teste-debug:arm64: 90a91dd5b08a Layer already exists                                                                                                                                                                                          0.0s 
 ✔ Pushing localhost:5002/teste-debug:arm64: fd6b80b55f9c Layer already exists                                                                                                                                                                                          0.0s 
 ✔ Pushing localhost:5002/teste-debug:arm64: c51ec726bd7f Layer already exists                                                                                                                                                                                          0.0s 
 ✔ Pushing localhost:5002/teste-debug:arm64: 11596a99d567 Layer already exists                                                                                                                                                                                          0.0s 
 ✔ Pushing localhost:5002/teste-debug:arm64: 644fed2a3898 Layer already exists                                                                                                                                                                                          0.0s 
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: sshpass -p 123456 ssh -p 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no torizon@192.168.50.54 LOCAL_REGISTRY=192.168.50.125 TAG=arm64 docker compose pull teste-debug 

Warning: Permanently added '192.168.50.54' (ED25519) to the list of known hosts.
docker: 'compose' is not a docker command.
See 'docker --help'

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

I spend many hour trying to understand if i miss any step or something like that, but I could not found out how to fix this. Can anyone help me please?

I saw this Blog: Next, Next, Install: The Easiest Way to Setup Your Windows PC for Embedded Linux and watch the video, and I know its experimental, but the steps on the video seems very different from what I following in the Visual Studio Code IDE Extension guide steps and it does not uses the Linux we installed on WSL but TorizonOS WSL.

Reading the quick start guide all over again, I saw in this url Installing the Operating System that the text says to select the TorizonCore with evaluation containers but in the figure Torizon OS Easy paring is marked to be used. Which one should I use? Because I’m using the TorizonCore with evaluation containers, not the Torizon OS Easy paring.

Thank you!

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

It appears you’re encountering an issue with the docker compose command not being recognized when attempting to deploy and debug a .NET application on a TorizonOS device. This problem typically arises due to a discrepancy in the Docker version or the Docker Compose installation itself. Let’s address your concerns step by step.

  1. Docker Compose Command Not Recognized: The error message docker: 'compose' is not a docker command. suggests that the Docker Compose V2 might not be enabled or properly installed in your environment. Docker Compose V2 is integrated into Docker as a plugin and replaces the older standalone docker-compose binary. To resolve this, ensure that Docker Compose V2 is enabled:

    • Check if Docker Compose V2 is installed by running docker compose version in your WSL2 terminal. If it’s not recognized, you’ll need to enable Docker Compose V2. You can typically do this through Docker Desktop settings under the “General” tab by checking the “Use Docker Compose V2” option.
    • Alternatively, if you’re managing Docker and Docker Compose without Docker Desktop, ensure you’ve followed the installation instructions for Docker Compose V2 on Linux.
  2. Docker Engine in WSL2: Ensure that your Docker engine is correctly configured to be accessible from WSL2. This typically involves setting the DOCKER_HOST environment variable or ensuring Docker Desktop’s WSL2 integration is properly configured.

  3. TorizonCore with Evaluation Containers vs. Torizon OS Easy Pairing: The choice between “TorizonCore with evaluation containers” and “Torizon OS Easy Pairing” depends on your development and evaluation needs.

    • TorizonCore with evaluation containers is recommended for initial development and testing. It comes preloaded with several containers that can be useful for development, including tools and examples to get started quickly.
    • Torizon OS Easy Pairing is designed to simplify the device registration and pairing process with the Torizon Platform, especially useful for managing devices at scale and deploying updates.

Given your current setup and the issues faced, I recommend ensuring that Docker Compose V2 is correctly installed and enabled. This should resolve the immediate issue with the docker compose command not being recognized. For your development setup, continuing with “TorizonCore with evaluation containers” is appropriate for initial development and testing phases.

If you’ve confirmed that Docker Compose V2 is correctly installed and the issue persists, it might be

Please, also check if these links can help you solve your problem:

Application Development - .NET Example | Toradex Developer Center.

Hey @rafael.lasertech

did you check this info: Torizon IDE Installation Wizard for Windows - Early Access Feedback Thread - #2 by matheus.tx

I’m sorry to hear that you are having a bad time with the configuration. One of the goals with the Torizon WSL 2 distro is to make it simpler for Windows users, but some edges must be improved yet. If possible, and if you haven’t done so yet, I ask that you follow the instructions from here and start again.

Also, the instructions from the steps on the installation wizard should guide you without need a documentation page or a video to follow. Please, if possible, let us know what steps you do not follow or for some reason they are not clear. This is early feedback is very valuable to us.

Yes, for this new flow we are starting to recommend, still in preview as you know, use the Torizon WSL 2 distro (is a Debian based distro, so at end you will have all that Debian has but all configured for the Torizon OS development flow).

This you are getting from your Ubuntu or from the Torizon WSL 2?

BR,

Hi @rafael.lasertech,

Looking at your version information you have Torizon 5.7.2 installed on your device. On this version of the OS the command for docker compose is docker-compose. In more recent versions of Torizon OS (6.X) the command is instead docker compose, notice the lack of a -.

Our IDE extension was designed to work with Torizon OS 6.X and newer, so it tries to use docker compose. This is why you get this error since you’re on the older OS version that does not have this specific command.

That said, please use a more recent version of Torizon OS if you want to use our IDE extension.

Best Regards,
Jeremias

Hi @matheus.tx . Thank you for your response.

I have tried both flows. In both I had the issue with the docker: 'compose' is not a docker command.. But in new flow I did not managed to download the .NET 8 SDK from the script that check those dependencies because it states error 401, so I have installed the SDK manually into the Torizon OS WSL by using the apt-get command from Microsoft.

@jeremias.tx, I think your information is critical for me. I have installed the version 5.7.2 that was listed on Toradex Easy Installer, I did not know that I can download the 6.x version from Torizon OS Embedded Linux Images.

I will try this new version to see if I can use both flows.

Thank you for now. I will back to you guys tomorrow.

1 Like

I have installed the version 5.7.2 that was listed on Toradex Easy Installer, I did not know that I can download the 6.x version from

When you first used Toradex Easy Installer there should have been an option to install 5.7.2 or the latest 6.X release for Torizon. Did you not see or have the 6.X option? I believe the latest release is 6.6.1.

Best Regards,
Jeremias

When you first used Toradex Easy Installer there should have been an option to install 5.7.2 or the latest 6.X release for Torizon. Did you not see or have the 6.X option? I believe the latest release is 6.6.1.

I did not (at least, I believe not). In first time all images listed on Toradex Easy Installer did not include this. I just saw the Toradex Easy Pairing (first on the list) and the Torizon OS with evaluation containers 5.7.2 (second on the list) and other Linux options.

I will put my cpu into recovery mode to get the OS list available and take a print screen using VNC if I can.

Just to give you @jeremias.tx a feedback. Here’s what is showing to me.

That “Torizon OS Easy Pairing”, image is the latest software for Torizon that you should be using as a starting point.

Best Regards,
Jeremias

Thank you @jeremias.tx , I installed the Torizon OS Easy Pairing version and I can confirm that now everything works just fine with the C# .NET 8 Test Application.

Perfect glad we were able to assist.