-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set notebook directory as current directory for pip installs from wor…
…kspace fs (#961) When users use a relative path to install a notebook scoped library with pip (eg `%pip install ../../foo`) it can fail since cwd for shell commands can be an ephemeral directory in DBRs < 14.0. For other shell commands, our preamble handles the cwd, but pip commands are moved to the beginning of the notebook, since they can lead to a kernel restart and hence loss of preamble. This means, they can't access the features of the full preamble and need an explicit `os.chdir` to set the correct path. ## Changes * Add an explicit `os.chdir(notebook_dir)` before each `%pip install`. * Also remove code to pass source_file and project_root to the wrappers as notebook params (for notebook jobs) and cli args (for python file jobs). Now these parameters are hard coded into the wrapper. These are updated on every run since the wrapper is recreated on every run. ## Tests * manual Fixes #958
- Loading branch information
1 parent
c9864e1
commit eec87b8
Showing
5 changed files
with
124 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.