Get the latest tech news
Notebooks Are McDonalds of Code
You can come to McDonalds and order a salad, but you won't. Same with notebooks, you can write NASA-production-grade software in a notebook, but most likely you won't.
In this case, you make your code work in a colab, smile widely and run your experiment after on a cluster or whatever. You start crying in twenty minutes after your code crashes due to lack of dependency or versioning or anything else similar. But even if you don't test your code, you have to make sure that it runs and produces similar results to what you've had in a notebook.
Or read this on Hacker News