ComputeCanada / software-stack

Repository to host issues relative to the Compute Canada software stack
12 stars 0 forks source link

Running jupyter lab in my own virtual environment - Permission error in tutorial #133

Closed AngCamp closed 1 year ago

AngCamp commented 1 year ago

I need to run a notebook in an environment which uses a custom data loading python module, this is the module here . I am following the jupyterlab tutorial for compute canada clusters here

But when I try to run this line

echo -e '#!/bin/bash\nunset XDG_RUNTIME_DIR\njupyter lab --ip $(hostname -f) --no-browser' > $allensdkenv/bin/jupyterlab.sh

I get the following error...

(allensdkenv) (base) [angcamp@cdr2688 angcamp]$ echo -e '#!/bin/bash\nunset XDG_RUNTIME_DIR\njupyter lab --ip $(cdr2688 -f) --no-browser' > $allensdkenv/bin/jupyterlab.sh
bash: /bin/jupyterlab.sh: Permission denied

I think my hostname may be wrong but also this permission error is unexpected, how can I run a jupyternotebook in an environment I create myself?

ccoulombe commented 1 year ago

@AngCamp Please write to support : https://docs.alliancecan.ca/wiki/Technical_support You can also use one of the already available hub on the systems : https://docs.alliancecan.ca/wiki/JupyterHub You must change the executable bit on your file as done in the previous step.

AngCamp commented 1 year ago

I'm not sure if this exists for virtualenv but there is this option for conda which adds a widget to the notebook which allows a user to select which environment to run a notebook in: https://medium.com/@jy.wong.xeron/managing-jupyter-notebooks-and-conda-environments-6b8c627e0c2f#3fa3

This is for conda which I know is frowned upon by compute canada but just as a suggestion there may something similar for virtualenv.

ccoulombe commented 1 year ago

@AngCamp If you encounter any issues, please write to support. Conda is indeed an humonguous issue on the systems. In all cases, you can do the same thing in a standard python virtual environment.

AngCamp commented 1 year ago

But the tutorial you have provided to do this is in virtualenv is not working....

mboisson commented 1 year ago

Please report support questions to our technical support so that one of our support team can help https://docs.alliancecan.ca/wiki/Technical_support

AngCamp commented 1 year ago

Why not just answer on github? It's easier to share code and it's more convenient than using an email thread.

mboisson commented 1 year ago

All of our support requests need to go through our standard channel for Technical support.