budtmo / docker-android

Android in docker solution with noVNC supported and video recording
Other
9.57k stars 1.27k forks source link

gpu acceleration in docker-android #183

Open K4W1H0R53 opened 5 years ago

K4W1H0R53 commented 5 years ago

hey guys, i have a little problem, how to enable gpu acceleration in docker-android?

I have a rx580 graphic card and my host system is archlinux with open source radeon driver installed.

I use the command "docker run --privileged -d -p 6080:6080 -p 5554:5554 -p 5555:5555 -e EMULATOR_ARGS="-gpu host" --name android-docker budtmo/docker-android-x86-8.1" , create a container and it can start the emulator normally, but the cpu useage is very high.

In container,I try to use "glxinfo | grep rendering" , it shows "Yes"; Then i try to use "glxinfo | grep OpenGL", it can show the correct opengl version.

I also try "Settings==>Advanced", choose options "Desktop native OpenGL" and "Renderer maximum" , but it still have no use.

I think the problem is a "docker" problem, but there are not many discussion. Whether I should install a ROCM to enable the gpu acceleration? or other solution?

thx.

update1: it seems that if i use qemu as vnc server, avd must work under "gpu guest"mode, if i want to use gpu host, i should use avd in host system.

KarthikHebbarMN commented 1 year ago

Also looking for this. + 1