Closed lukemarsden closed 2 years ago
3 is an easier problem than going from import foo
--> pip install foobar
. In particular, we could (in theory) pull out all the import X as Y
lines in a notebook, create a new virtualenv, install the requirements.txt in it, then try to run all the import lines. If they succeed, tell the user it's all good. If they fail, tell the user they need to add some lines to the requirements.txt.
Maybe that could be a separate command, something like same program verify
? I imagine pulling down all dependencies into a new virtualenv could be expensive, specially if they're using stuff like numpy
, tensorflow
etc.
Decided to go the route of injecting the requirements.txt
file into the kubeflow containers, since that way we can support the full requirements.txt
spec without worrying about parsing it ourselves. Example of a same run with a configured requirements.txt
file:
Closing this as the same verify
and requirements: [...]
features cover this.
Encourage the user to write down the specific versions of dependencies they have for their notebook in a requirements.txt.
./requirements.txt
or./pyproject.toml
in thesame.yaml