-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#273: Added jupyterenv/bin to environment variable PATH inside the Entrypoint #314
Conversation
rather than relying on shell variable expansion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved. But honestly a not so nice solution. wouldn't it be better to investigate why the Jupyrer venv is (sometimes?) not active in Notebooks?
@@ -175,7 +183,8 @@ def _commit_container( | |||
"Env": [ | |||
f"VIRTUAL_ENV={virtualenv}", | |||
f"NOTEBOOK_FOLDER_FINAL={notebook_folder_final}", | |||
f"NOTEBOOK_FOLDER_INITIAL={notebook_folder_initial}" | |||
f"NOTEBOOK_FOLDER_INITIAL={notebook_folder_initial}", | |||
f"PATH={path}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can not go here, because the we can not activate the the environment for the whole system. It would be also for the wrong user. This needs to go into the entry point because there we are calling the correct python version and only there this addition to PATH is valid.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We actually need to do the same for the AMI and VMs, this means we should use the entry point in the systemd unit. We already have a ticket for that. Please, work on that afterwards.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, see next push.
@@ -75,6 +79,11 @@ def arg_parser(): | |||
return parser | |||
|
|||
|
|||
def command_with_venv(venv_activate: Path, command: List[str]) -> List[str]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah - left over from an experiment.
Thanks!
Removed in next push.
doc/changes/changes_2.1.0.md
Outdated
@@ -18,6 +18,7 @@ Version: 2.1.0 | |||
* #279: Made the notebooks tests running in SaaS as well as in the Docker-DB. | |||
* #19: Added SLC notebook | |||
* #301: Added CloudFront distribution for example data S3 bucket | |||
* #273: Added `jupyterenv/bin` to environment variable `PATH` inside the DockerContainer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* #273: Added `jupyterenv/bin` to environment variable `PATH` inside the DockerContainer | |
* #273: Added `jupyterenv/bin` to environment variable `PATH` inside the Entrypoint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thanks!
See next push.
Closes #273
pip
in/usr/bin/pip
/home/jupyter/jupyterenv/bin
needs to be prepended to environment variablePATH
in order to override the system-wide binarypython -m pip would also be fine
sincepython
andpip
both are aware of the directory of the initially called binaryActually, inside a Jupyter notebook the Jupyter virtual env should be activated anyway, but we have observations not confirming this assumption.