nvidia / dgx-selinux Goto Github PK
View Code? Open in Web Editor NEWDGX RHEL SELinux Policies
License: Other
DGX RHEL SELinux Policies
License: Other
Hi, I'm very happy that this SELinux policy exists! However, I seem to have found one problem:
My goal is to start a container that can access NVIDIA GPUs and that one can connect to via SSH:
I start my container via:
$ podman run --rm -it -p 10022:22 \
--security-opt label=type:nvidia_container_t \
nvcr.io/nvidia/cuda:11.2.2-base-centos8
I can verify that GPUs are accessible, i.e., nvidia-smi
returns the expected output.
I now want to set up and run an SSH server inside the container:
[root@176645926b31 /]# yum -y install openssh-server
[root@176645926b31 /]# ssh-keygen -A
[root@176645926b31 /]# mkdir -p /root/.ssh
[root@176645926b31 /]# echo "YOUR_SSH_PUBLIC_KEY" > /root/.ssh/authorized_keys
[root@176645926b31 /]# /usr/sbin/sshd -D
And finally connect to it from outside. However, here, I receive the following error:
$ ssh root@localhost -p 10022
Connection closed by ::1 port 10022
If I repeat the above steps but without the --security-opt label=type:nvidia_container_t
option, I can connect via SSH as expected (i.e., don't receive the error in the last step). Naturally, the nvidia-smi
does not work in this case because it is blocked by SELinux as the nvidia-container
policy is not loaded.
I am also seeing the same behavior with the nvcr.io/nvidia/cuda:11.2.2-base-centos7
image or the --cap-add ALL
flag.
What is preventing the SSH connection here? Can the policy be changed to support this behavior? Or is there some option I can pass when starting the container to allow this? Thank you!
Can we include a prebuild policy (the .pp file) as a release/download, so others can use the policy right away without installing SELinux toolchain?
Given these selinux policies have been useful in RHEL7 with enabling rootless containers even on non-DGX systems, it would be useful if this project added official support for such policies in RHEL9
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.