EU-TEACHING / teaching-app

Repository for TEACHING application startup and deployment. This can be taken as the main access point for the TEACHING plaform developed within the EU TEACHING 2020 project.
MIT License
17 stars 4 forks source link

The platform does not start on IMX8 #4

Closed chronis10 closed 2 years ago

chronis10 commented 2 years ago

Hello to everyone, I tried yesterday to deploy the scenario 1 of the platform on the IMX8, I followed the instruction from the README, but the platform keep crashing. I believe something missing from the instructions. The docker returns me the error "exec user process caused exec format error" and usually that error means wrong image architecture. To help, I also attached a log file.

log.txt

vdecaro commented 2 years ago

Hi @chronis10,

it is pretty likely that, for some reason, it is pulling the AMD64 image instead of the ARM64.

vlomonaco commented 2 years ago

Isn't this hard-coded here? https://github.com/EU-TEACHING/teaching-app/blob/main/scenarios/scenario_1.yaml#L22

chronis10 commented 2 years ago

I agree @vdecaro, based on the @vlomonaco instructions I thought that now the docker automatically downloads the correct version for the platform. What is the deployment procedure you followed in your IMX8?

vdecaro commented 2 years ago

I thought that the image to pull would have been chosen automatically depending on the configuration of the docker engine. It should have something telling "this engine is running on an ARM64 arch". @lorenzoinm do you know anything about this?

If you do not arrive to a solution within lunchtime (unfortunately, I cannot join you in solving the problem due to other duties), we can just backup to the images with the tag defining the architecture and re-run the workflows for building them.

vlomonaco commented 2 years ago

It seems to me the tags and images on DockerHub are already ok.

@chronis10 are you sure your $ARCH variable is set correctly? You can check it with echo $ARCH. The output should be "arm64".

If not, you can set the variable

export ARCH=arm64

And run docker-compose again:

docker-compose -f scenarios/scenario_1.yaml up

chronis10 commented 2 years ago

Great it worked. We may have to update the instructions because I wasn't aware of that. Maybe I missed it though, in which case, apologies.

vlomonaco commented 2 years ago

It is indeed missing in the doc, I'll update it accordingly! Thanks for opening the issue! :D

lorenzoinm commented 2 years ago

I am not an expert, but as far as I understand standard registry have multiple architectures for the same tags, like this: image This choice is made automatically by docker on the client, i.e. it pulls the container with the correct architecture. In the teaching app, we have separate tags for each architecture, like this: image I suppose this is the reason why you need to specify the architecture by hand (as env variable).