Hi everyone,
I was just testing things out to come up with a reasonable way of working with version management in DB and was inspired by the commands specified here. For my team and I, it makes no sense to put the requirements file in the dbfs location, as that will decouple version management from the actual code development that we do in git. Of course, the requirements file should be in the repository with the code and not in some dbfs folder which is not a git folder.
So I created a requirements.txt file in my git repo and pulled it to my Repo folder and tried doing a %pip install -r requirements.txt, but this is where I run into problems:
- From my notebook "main" I can run my other notebook "notebook1" using the magic command `%run ./notebook1` and I get no errors.
- From my notebook "main" I cannot run the magic command `%pip install -r ./requirements.txt` and databricks gives me the error that `ERROR: Could not open requirements file: [Errno 2] No such file or directory`.
- I have tried writing the path to the requirements file in these different ways but with the same outcome:
- ./requirements.txt
- ./requirements
- requirements.txt
- requirements
- Workspace/repos/user/repo-name/requirements.txt
- Workspace/repos/user/repo-name/requirements
- ./Workspace/repos/user/repo-name/requirements.txt
So my questions are:
- Should I write the path another way or is it not possible to point to a .txt file in a repo folder?
- If it is not possible, how does Databricks intend us to develop code and work with version management in a reasonable way?
My DBR is 7.3 LTS ML (includes Apache Spark 3.0.1, Scala 2.12).
Thank you!