Pop!_OS 20.04 is not supported by nvidia container toolkit

Pop!_OS 20.04 is based on Ubuntu 20.04 LTS.
I followed the install guide https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker
Setting up Docker with:

curl https://get.docker.com | sh \
  && sudo systemctl --now enable docker

went well.
Setting up nvidia container toolkit using:

distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
      && curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
      && curl -s -L https://nvidia.github.io/libnvidia-container/experimental/$distribution/libnvidia-container.list | \
         sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
         sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list

failed, with a message telling that the OS is not supported.

  • Kernel version from uname -a[Linux pop-os 5.17.5-76051705-generic #202204271406~1653440576~20.04~6277a18-Ubuntu SMP PREEMPT Thu Ma x86_64 x86_64 x86_64 GNU/Linux ]
    NVSMI LOG:
    Timestamp : Sun Jan 22 17:38:59 2023
    Driver Version : 470.141.03
    CUDA Version : 11.4
    Attached GPUs : 1
    GPU 00000000:01:00.0
    Product Name : NVIDIA GeForce GTX 1660 Ti
  • [Client: Docker Engine - Community
    Version: 20.10.23
  • NVIDIA packages version from dpkg -l '*nvidia*'[ 470.141.03-1pop0~1660260989~20.04~d973896, nvidia-cuda-dev 10.1.243-3, nvidia-settings 470.57.01-0ubuntu0.20.04.3, system76-driver-nvidia 20.04.62~1661449829~20.04~0337294 ]

I found the solution here: github /NVIDIA/nvidia-docker/issues/1464

I run into another issue, due to a missing $-sign before (lsb_release -cs) in the Install code in container-toolkit/install-guide.html#containerd :

echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \ (lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
and found the solution here:
unmet dependencies Running apt-get update broken -- See apt-secure(8) manpage for details · Issue #1349 · NVIDIA/nvidia-docker · GitHub

Now I face another issue with containerd config.toml patch.