zwift icon indicating copy to clipboard operation
zwift copied to clipboard

Podman + PRIME (dual gpu intel + nvidia) not working

Open netbrain opened this issue 1 year ago • 6 comments

When using PRIME the following command works for offloading zwift onto the nvidia gpu in docker.

docker run  -d \
  -e __NV_PRIME_RENDER_OFFLOAD=1 \
  -e __GLX_VENDOR_LIBRARY_NAME=nvidia \
  --rm \
  --privileged \
  -e DISPLAY=:0 \
  -v /tmp/.X11-unix:/tmp/.X11-unix \
  -v /run/user/1000/pulse:/run/user/1000/pulse \
  -v zwift-netbrain:/home/user/Zwift \
  --gpus device=GPU-f9b76734-5873-5957-26f3-99604ac5f15a docker.io/netbrain/zwift:latest

However the equivalent command for podman launches the zwift instance on the intel graphics card.

Should probably look into the following resources in order to determine how this can be solved for podman.

https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/cdi-support.html

netbrain avatar Sep 13 '23 21:09 netbrain

For what it's worth, the following breadcrumb helped me get past the above: https://github.com/NVIDIA/nvidia-container-toolkit/issues/154#issuecomment-1876686322

gregh3285 avatar Jan 17 '24 00:01 gregh3285

Did you look at #147 wonder if this is related?

sHedC avatar Jul 08 '24 08:07 sHedC

Can you try with the latest, one issue noticed was that the NVIDIA environment variables were delcared too early, I have moved them to the final docker build part.

sHedC avatar Jul 14 '24 16:07 sHedC

Not working here:

gregh@Iago:/tmp$ /usr/local/bin/zwift
You are running latest zwift.sh 👏
latest: Pulling from netbrain/zwift
b1e7716bc2ae: Pull complete 
f4cc7fab2776: Pull complete 
961770e3c8f4: Pull complete 
ec2fc8bb93af: Pull complete 
891fc5a514d6: Pull complete 
91d3c72062c8: Pull complete 
27c225951703: Pull complete 
a77fe582be47: Pull complete 
bb3aa9ee0979: Pull complete 
65c4ff73c14f: Pull complete 
5a3f8924da7b: Pull complete 
de36efc410c7: Pull complete 
b060632551dc: Pull complete 
49bc3a60e777: Pull complete 
4f4fb700ef54: Pull complete 
1f28b6854218: Pull complete 
5412401d128e: Pull complete 
30cf83acf330: Pull complete 
8360dfe43bf3: Pull complete 
da24a42f31a7: Pull complete 
Digest: sha256:2abc60d56117d19c9ccdccb4d07936e791fbff1f4c3b2f933cfd5780ada8e84e
Status: Downloaded newer image for netbrain/zwift:latest
docker.io/netbrain/zwift:latest
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
nvidia-container-cli: initialization error: load library failed: libnvidia-ml.so.1: cannot open shared object file: no such file or directory: unknown.
Error - Error can't run zwift, check variables!
gregh@Iago:/tmp$ 

gregh3285 avatar Jul 14 '24 18:07 gregh3285

Ok thanks does this help?

https://github.com/docker/genai-stack/issues/95

Can you run does it show the nvidia? docker run -it --rm --gpus all ubuntu nvidia-smi

sHedC avatar Jul 14 '24 18:07 sHedC

@gregh3285 Just run across this as I have instabilities in wayland with Nvidia, not much for my needs but have you seen it re controlling nvidia intel hybrid stuff?

https://github.com/bayasdev/envycontrol

sHedC avatar Jul 25 '24 07:07 sHedC