def runtime(self, _from='0'):
        """Generate the set of instructions to install the runtime specific
        components from a build in a previous stage.

        # Examples

        ```python
        n = nccl(...)
        Stage0 += n
        Stage1 += n.runtime()
        ```
        """
        self.rt += comment('NCCL')
        if self.__build:
            self.rt += copy(_from=_from, src=self.__prefix, dest=self.__prefix)
            self.rt += environment(variables=self.environment_step())
        else:
            self.rt += packages(ospackages=self.__ospackages)
            self.rt += packages(
                apt=['libnccl2={0}+cuda{1}'.format(self.__version,
                                                   self.__cuda)],
                apt_keys=['https://developer.download.nvidia.com/compute/cuda/repos/{0}/{1}/3bf863cc.pub'.format(self.__distro_label, get_cpu_architecture())],
                apt_repositories=['deb [signed-by=/usr/share/keyrings/3bf863cc.gpg] https://developer.download.nvidia.com/compute/cuda/repos/{0}/{1} /'.format(self.__distro_label, get_cpu_architecture())],
                yum=['libnccl-{0}+cuda{1}'.format(self.__version, self.__cuda)],
                yum_keys=['https://developer.download.nvidia.com/compute/cuda/repos/{0}/{1}/3bf863cc.pub'.format(self.__distro_label, get_cpu_architecture())],
                yum_repositories=['https://developer.download.nvidia.com/compute/cuda/repos/{0}/{1}'.format(self.__distro_label, get_cpu_architecture())])

        return str(self.rt)
Generate the set of instructions to install the runtime specific
        components from a build in a previous stage.

        # Examples

        ```python
        n = nccl(...)
        Stage0 += n
        Stage1 += n.runtime()
        ```
        
hpccm/building_blocks/nccl.py