How to add group to the user

coder@coder-56962455-3ec4-4089-bdbc-08698fbafd40-cc99d985-w22cf:~$ rocminfo
ROCk module is loaded
Unable to open /dev/kfd read-write: Permission denied
Failed to get user name to check for video group membership
coder@coder-56962455-3ec4-4089-bdbc-08698fbafd40-cc99d985-w22cf:~$ rocm-smi


======================================= ROCm System Management Interface =======================================
================================================= Concise Info =================================================
Device Node IDs Temp Power Partitions SCLK MCLK Fan Perf PwrCap VRAM% GPU%
(DID, GUID) (Edge) (Avg) (Mem, Compute, ID)
================================================================================================================
0 1 0x73bf, 15079 42.0°C 20.0W N/A, N/A, 0 0Mhz 456Mhz 0% auto 255.0W 0% 0%
================================================================================================================
============================================= End of ROCm SMI Log ==============================================
coder@coder-56962455-3ec4-4089-bdbc-08698fbafd40-cc99d985-w22cf:~$ rocminfo
ROCk module is loaded
Unable to open /dev/kfd read-write: Permission denied
Failed to get user name to check for video group membership
coder@coder-56962455-3ec4-4089-bdbc-08698fbafd40-cc99d985-w22cf:~$ rocminfo
ROCk module is loaded
Unable to open /dev/kfd read-write: Permission denied
Failed to get user name to check for video group membership
coder@coder-56962455-3ec4-4089-bdbc-08698fbafd40-cc99d985-w22cf:~$ rocm-smi


======================================= ROCm System Management Interface =======================================
================================================= Concise Info =================================================
Device Node IDs Temp Power Partitions SCLK MCLK Fan Perf PwrCap VRAM% GPU%
(DID, GUID) (Edge) (Avg) (Mem, Compute, ID)
================================================================================================================
0 1 0x73bf, 15079 42.0°C 20.0W N/A, N/A, 0 0Mhz 456Mhz 0% auto 255.0W 0% 0%
================================================================================================================
============================================= End of ROCm SMI Log ==============================================
coder@coder-56962455-3ec4-4089-bdbc-08698fbafd40-cc99d985-w22cf:~$ rocminfo
ROCk module is loaded
Unable to open /dev/kfd read-write: Permission denied
Failed to get user name to check for video group membership
No description
No description
6 Replies
Emircan
EmircanOP5mo ago
No description
Emircan
EmircanOP5mo ago
@Phorcys yes i know linux part but IDK how.. in TF
resource "coder_agent" "main" {
os = "linux"
arch = "amd64"
startup_script = <<-EOT
set -e

sudo usermod -a -G video coder
resource "coder_agent" "main" {
os = "linux"
arch = "amd64"
startup_script = <<-EOT
set -e

sudo usermod -a -G video coder
is not work probably because of it run via coder. and not sure where command = ["sh", "-c", coder_agent.main.init_script]
Phorcys
Phorcys5mo ago
this should work, try running it in the terminal after the workspace starts and see if that works
Emircan
EmircanOP5mo ago
Cant, coder is not sudo tf admin should arrange coder's group
Phorcys
Phorcys5mo ago
ah yeah that makes sense, your Dockerfile should add it as part of sudoers see https://github.com/uwu/basic-env/blob/59d7e8d9b0328ffa59654eb8de79f200a930fcd6/.github/devcontainer/base/.devcontainer/Dockerfile#L27-L29 for an example hey @emircanerkul, any luck?

Did you find this page helpful?