avatartwo / avatar2

Python core of avatar²
Apache License 2.0
518 stars 98 forks source link

Docker container avatar2 cannot run handbook 0x02 #102

Closed LittleNewton closed 2 years ago

LittleNewton commented 2 years ago

In container avatar2, I ran those python scripts:

from avatar2 import *
avatar = Avatar()
qemu = avatar.add_target(QemuTarget, name='qemu1')

and I got those error outputs (python trace has been ignored).

Have you tried running the avatar2-installer (python -m avatar2.installer) or setting the AVATAR2_QEMU_EXECUTABLE environment variable?
aurelf commented 2 years ago

As the error message indicates, this looks like an incomplete install of avatar. Does your docker includes avatar-qmeu? avatar-qemu can be installed with "targets/build_qemu.sh" If the problem persists, please reopen the bug attaching the Dockerfile used and complete error logs.

LittleNewton commented 2 years ago

I solved this problem by adding a environment variable before deploying the avatar2 container.

ENV: AVATAR2_QEMU_EXECUTABLE VALUE: qemu-system-arm

If this project provides a docker-compose.yml or other guides for generating a container, it will be better.