Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
netbrain opened this issue Sep 13, 2023 · 6 comments
Open

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

netbrain opened this issue Sep 13, 2023 · 6 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@netbrain
Copy link
Owner

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 netbrain added help wanted Extra attention is needed good first issue Good for newcomers labels Sep 13, 2023
@netbrain netbrain pinned this issue Sep 16, 2023
@gregh3285
Copy link

For what it's worth, the following breadcrumb helped me get past the above:
NVIDIA/nvidia-container-toolkit#154 (comment)

@sHedC
Copy link
Collaborator

sHedC commented Jul 8, 2024

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

@sHedC
Copy link
Collaborator

sHedC commented Jul 14, 2024

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.

@gregh3285
Copy link

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$ 

@sHedC
Copy link
Collaborator

sHedC commented Jul 14, 2024

Ok thanks does this help?

docker/genai-stack#95

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

@sHedC
Copy link
Collaborator

sHedC commented Jul 25, 2024

@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

@netbrain netbrain unpinned this issue Oct 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants