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

/etc/ld.so.cache is wrong running ARM container on x86 host #423

Open
trxcllnt opened this issue Mar 22, 2024 · 2 comments
Open

/etc/ld.so.cache is wrong running ARM container on x86 host #423

trxcllnt opened this issue Mar 22, 2024 · 2 comments

Comments

@trxcllnt
Copy link
Member

trxcllnt commented Mar 22, 2024

Possibly related: #373, #123

It looks like the ldcache is incorrect when emulating an ARM container on an x86 host:

$ docker run --rm -it --platform linux/amd64 --gpus all ubuntu:22.04 ldconfig -p 2>/dev/null | grep libstdc++ && echo $? || echo $?
	libstdc++.so.6 (libc6,x86-64) => /usr/lib/x86_64-linux-gnu/libstdc++.so.6
0
$ docker run --rm -it --platform linux/arm64 --gpus all ubuntu:22.04 ldconfig -p 2>/dev/null | grep libstdc++ && echo $? || echo $?
1

The above commands without the --gpus all flag have the correct output:

$ docker run --rm -it --platform linux/amd64 ubuntu:22.04 ldconfig -p 2>/dev/null | grep libstdc++ && echo $? || echo $?
	libstdc++.so.6 (libc6,x86-64) => /lib/x86_64-linux-gnu/libstdc++.so.6
0
$ docker run --rm -it --platform linux/arm64 ubuntu:22.04 ldconfig -p 2>/dev/null | grep libstdc++ && echo $? || echo $?
	libstdc++.so.6 (libc6,AArch64) => /lib/aarch64-linux-gnu/libstdc++.so.6
0
@elezar
Copy link
Member

elezar commented Mar 25, 2024

@trxcllnt the NVIDIA Container Toolkit Injects GPU driver libraries from the host into the container. With this in mind, it is unlikely that emulated containers will work as expected.

(Note that this is not to say that the code to run ldconfig does not need some adjustment. Could you please confirm your NVIDIA Container Toolkit version?)

@trxcllnt
Copy link
Member Author

$ apt policy nvidia-container-toolkit
nvidia-container-toolkit:
  Installed: 1.14.6-1
  Candidate: 1.14.6-1
  Version table:
 *** 1.14.6-1 600
        600 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64  Packages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants