Skip to main content
Topic: [RunC / cgroups v2 / OpenRC] Allow GPU access for the container. (Read 319 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[RunC / cgroups v2 / OpenRC] Allow GPU access for the container.

Good afternoon,

How to enable GPU access for the RunC container while using cgroup v2?

So far I've switched OpenRC from hybrid cgroups to version 2 only & I've also applied:
Code: [Select]
"linux": {
"resources": {
"devices": [
{
"allow": false,
"access": "rwm"
},
{
"allow": true,
"type": "c",
"major": 10,
"minor": -1,
"access": "rw"
},
{
"allow": true,
"type": "b",
"major": 8,
"minor": 0,
"access": "rw"
}
]
},
"namespaces": [
{
"type": "pid"
},
{
"type": "network",
"path": "/var/run/netns/user_network"
},
{
"type": "ipc"
},
{
"type": "uts"
},
{
"type": "mount"
}
]
}

to allow the container to use GPU but it didn't worked (still the container is using llvmpipe).

I've tried looking around the wiki of runc but there's no specific info about this.
I've also binded `/dev/dri` & still no success. Although radeon-profile software can read the GPU parameters.

My GPU is AMD Radeon R7 while the kernel version is `6.4.7-artix1-2`.