Translations:JupyterNotebook/5/fr

From Alliance Doc
Jump to navigation Jump to search
  1. Chargez le module Python.
    [name@server ~]$ module load python/3.7
    
  2. Créez un nouvel environnement virtuel Python.
    [name@server ~]$ virtualenv $HOME/jupyter_py3
    
  3. Activez votre nouvel environnement virtuel Python.
    [name@server ~]$ source $HOME/jupyter_py3/bin/activate
    
  4. Installez Jupyter Notebook dans votre nouvel environnement virtuel Python.
    (jupyter_py3)_[name@server ~]$ pip install --no-index --upgrade pip
    (jupyter_py3)_[name@server ~]$ pip install --no-index jupyter
    
  5. Dans votre nouvel environnement virtuel, créez un script (wrapper) pour lancer Jupyter Notebook.
    (jupyter_py3)_[name@server ~]$ echo -e '#!/bin/bash\nexport JUPYTER_RUNTIME_DIR=$SLURM_TMPDIR/jupyter\njupyter notebook --ip $(hostname -f) --no-browser' > $VIRTUAL_ENV/bin/notebook.sh
    
  6. Enfin, rendez le script exécutable.
    (jupyter_py3)_[name@server ~]$ chmod u+x $VIRTUAL_ENV/bin/notebook.sh