Creating a custom environment from a requirements.txt in Jupyter

I was given a Github-notebook where the author only provided a requirements.txt.

Inside, the biggest python packages were used (pytorch, tensorflow - you name it).

This proved particularly difficult to setup. The steps are published in a notebook:

https://wwwpub.zih.tu-dresden.de/~s7398234/dependencies.html

The steps cover:

  • How to setup persistent Python environments from a Jupyter Lab container running in Docker
  • How to link the environment Python Kernel to Jupyter
  • How to combine both conda and pip to solve dependency issues
  • How to gradually define/loosen dependency pinnings