Ubuntu 22.04 support timeline

I would not use Ubuntu’s --allow-third-party, as that will attempt to install their versions of the nvidia drivers, cuda, etc. Versus the version that pytorch and tensorflow are built with.

There would be more information in the logs about the conflicts.

Also you should do:
$ sudo apt update
$ sudo apt dist-upgrade
Then do the:
$ sudo do-release-upgrade -d

Or you can first remove lambda stack, do the upgrade, then do the install.
$ sudo apt update
$ sudo apt dist-upgrade
… then remove lambda stack
How do I remove and reinstall Lambda Stack? | Lambda Docs

sudo rm -f /etc/apt/sources.list.d/{graphics,nvidia,cuda}* &&
dpkg -l |
awk ‘/cuda|lib(accinj64|cu(blas|dart|dnn|fft|inj|pti|rand|solver|sparse)|magma|nccl|npp|nv[^p])|nv(idia|ml)|tensor(flow|board)|torch/ { print $2 }’ |
sudo xargs -or apt -y remove --purge

Do the upgrade:
sudo do-release-upgrade -d

Then reinstall lambda stack: (Lambda Stack: an AI software stack that's always up-to-date)
wget -nv -O- https://lambdalabs.com/install-lambda-stack.sh | sh -

Then do the reboot.