WSL2 docker image cannot use gpu on other server
Version
21H2
WSL Version
- [X] WSL 2
- [ ] WSL 1
Kernel Version
No response
Distro Version
No response
Other Software
No response
Repro Steps
- I create a docker container with gpu docker run --gpus all -it {image_id} bash
- Install my python packages
- I commit my container as a image docker commit {cotainer_id} {image_name}:{tag}
- Run the image in server via k8s
- can't use gpu in the new container(k8s pod)
- the bug infos as : `ldconfig
/sbin/ldconfig.real: File /usr/lib/x86_64-linux-gnu/libcuda.so is empty, not checked.
/sbin/ldconfig.real: File /usr/lib/x86_64-linux-gnu/libcuda.so.1 is empty, not checked.
/sbin/ldconfig.real: File /usr/lib/x86_64-linux-gnu/libdxcore.so is empty, not checked.
/sbin/ldconfig.real: File /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1 is empty, not checked.
/sbin/ldconfig.real: /usr/lib/x86_64-linux-gnu/libcuda.so.1 is not a symbolic link`
- I modify libcuda.so and libnvidia-smi soft link then it work `rm -f /usr/lib/x86_64-linux-gnu/libcuda.so /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1
ln -s /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.510.47.03 /usr/lib/x86_64-linux-gnu/libnvidia-ml.so.1
ln -s /usr/lib/x86_64-linux-gnu/libcuda.so.1 /usr/lib/x86_64-linux-gnu/libcuda.so`
Expected Behavior
who can tell me why
Actual Behavior
none
Diagnostic Logs
No response
This doesn't seem like a wsl issue but an issue with the specific container image you're using or docker (the only thing WSL does is mount libdxcore.so)
i have the same issue, when build a gpu images by --gpus all。and then run this image on another linux server.