Skip to content

Latest commit

 

History

History
22 lines (17 loc) · 2.58 KB

jupyter-notebook-on-occigen.md

File metadata and controls

22 lines (17 loc) · 2.58 KB
  • 2 cases :

    • you have a fix PC with a fix IP -> you can connect directly to occigen, jupyter-notebooks will render smoothly
    • you have a portable PC with a variable IP -> you must connect to cal1 first then to occigen
  • Make sure to add the options -CX (-CXY on MAC) when you ssh to cal1 and occigen, in order to have the pop-ups rendered (not only for notebooks but also ncview or display) or you can open a VNC interactive session for the pop up.

  • When you are on occigen, you must know that conda install is not possible (the http server is blocked) and only pip install is available. There are 2 solutions:

    • Ask svp@cines.fr to install you a conda environment with a list of libraries, and each time you want a new library installed (make sure to ask for jupyter or jupyterlab!)
    • Use conda-pack to install a conda environment on your occigen account. For conda-pack to work, conda must be installed and be on your path. In order to set this up, first scp miniconda for a Linux system to occigen and bash install miniconda. Now, pack your desired conda environment in a local Linux environment using conda-pack and then scp the packed tar file to $SCRATCHDIR on occigen. Once you've expanded the tar file, you can activate the conda environment running $ source $SCRATCHDIR/my_env/bin/activate. Make sure the path of the Python packages points to where your conda environment is ($SCRATCHDIR/my_env/bin/python).
  • You need firefox to render your jupyter notebook/lab: so in your .bashrc put the line module load firefox

  • Look for the file /home/albert7a/.jupyter/jupyter_notebook_config.pyin your occigen account and modify the lines:

    • Comment the line c.NotebookApp.password = ....
    • Uncomment the line c.NotebookApp.open_browser=True.
    • Uncomment the line c.NotebookApp.browser = and choose firefox as the browser.
    • Uncomment the line c.NotebookApp.port = ... and set a port number that you prefer so that the notebook always first tries to use the same port number.
  • If you want to use dask-jobqueue (to submit a SLURM job to get computational resources):

    • Install the dask-jobqueue library.
    • Copy the file /home/albert7a/.config/dask/jobqueue.yaml in your account.
    • The syntax of the commands to put in the notebook is described here.