← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~vorlon/launchpad-buildd:devtmpfs into launchpad-buildd:master

 

NVIDIA is still special, please keep all that.

Diff comments:

> diff --git a/lpbuildd/target/lxd.py b/lpbuildd/target/lxd.py
> index fb0aad1..2512043 100644
> --- a/lpbuildd/target/lxd.py
> +++ b/lpbuildd/target/lxd.py
> @@ -623,26 +605,6 @@ class LXD(Backend):
>              )
>  
>          if "gpu-nvidia" in self.constraints:
> -            # Create nvidia* devices.  We have to do this here rather than
> -            # bind-mounting them into the container, because bind-mounts
> -            # aren't propagated into snaps (such as lxd) installed inside
> -            # the container.

I believe this hunk is still required. Most nvidia gpu drivers are propietary and do not have access to devtmpfs apis to automagically create the various nvidia device nodes. Thus they must be created by hand _somehow_. Most of nvidia proprietary drivers/libraries vendor in a thing that constantly checks for loaded modules and attempts to constantly mknod things, to prevent that from happening inside the container, it is best to pre-mknod devices in the target container, still.

> -            for path in self._nvidia_container_paths:
> -                if path.startswith("/dev/"):
> -                    st = os.stat(path)
> -                    if stat.S_ISCHR(st.st_mode):
> -                        self.run(
> -                            [
> -                                "mknod",
> -                                "-m",
> -                                "0%o" % stat.S_IMODE(st.st_mode),
> -                                path,
> -                                "c",
> -                                str(os.major(st.st_rdev)),
> -                                str(os.minor(st.st_rdev)),
> -                            ]
> -                        )
> -
>              # We bind-mounted several libraries into the container, so run
>              # ldconfig to update the dynamic linker's cache.
>              self.run(["/sbin/ldconfig"])
> diff --git a/lpbuildd/target/tests/test_lxd.py b/lpbuildd/target/tests/test_lxd.py
> index 04078fa..9eefd66 100644
> --- a/lpbuildd/target/tests/test_lxd.py
> +++ b/lpbuildd/target/tests/test_lxd.py
> @@ -636,30 +611,6 @@ class TestLXD(TestCase):
>          if gpu_nvidia:
>              expected_args.extend(
>                  [
> -                    Equals(

as per above please keep this too.

> -                        lxc
> -                        + [
> -                            "mknod",
> -                            "-m",
> -                            "0666",
> -                            "/dev/nvidia0",
> -                            "c",
> -                            "195",
> -                            "0",
> -                        ]
> -                    ),
> -                    Equals(
> -                        lxc
> -                        + [
> -                            "mknod",
> -                            "-m",
> -                            "0666",
> -                            "/dev/nvidiactl",
> -                            "c",
> -                            "195",
> -                            "255",
> -                        ]
> -                    ),
>                      Equals(lxc + ["/sbin/ldconfig"]),
>                  ]
>              )


-- 
https://code.launchpad.net/~vorlon/launchpad-buildd/+git/launchpad-buildd/+merge/442776
Your team Launchpad code reviewers is requested to review the proposed merge of ~vorlon/launchpad-buildd:devtmpfs into launchpad-buildd:master.



References