[GH-ISSUE #183] gpu acceleration in docker-android #131

Open
opened 2026-03-01 15:40:46 +03:00 by kerem · 1 comment
Owner

Originally created by @K4W1H0R53 on GitHub (Jul 25, 2019).
Original GitHub issue: https://github.com/budtmo/docker-android/issues/183

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.

Originally created by @K4W1H0R53 on GitHub (Jul 25, 2019). Original GitHub issue: https://github.com/budtmo/docker-android/issues/183 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.
Author
Owner

@KarthikHebbarMN commented on GitHub (Jun 11, 2023):

Also looking for this. + 1

<!-- gh-comment-id:1586076532 --> @KarthikHebbarMN commented on GitHub (Jun 11, 2023): Also looking for this. + 1
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/docker-android#131
No description provided.