I'd like to run multiple docker-android instances in docker swarm. But they fail:
ERROR | x86 emulation currently requires hardware acceleration!
https://developer.android.com/studio/run/emulator-acceleration#vm-linux
CPU acceleration status: /dev/kvm is not found: VT disabled in BIOS or KVM kernel module not loaded
My node supports kvm and running directly on the node with docker compose when adding privileged: true
works fine.
But docker swarm doesn't support privileged mode!
They recently added cap_add
support in swarm, so I tried to add all available caps, but none of them enables kvm inside the container.
Devices is also not supported in swarm mode!
devices:
- "/dev/kvm:/dev/kvm"
I know about this workaround for priviledge mode, but I want to make use of the deploy resources limits to auto select nodes based on memory.
I need a solution fast, so I will open a bounty.
I'm open for any hacky way or sth like docker forks which support this