cc_staff
284
edits
m (Added warning about running long analysis in notebooks) |
(Added section on how to run notebook as python scripts) |
||
Line 257: | Line 257: | ||
* It is possible to reopen an active desktop session after the web browser tab was closed. | * It is possible to reopen an active desktop session after the web browser tab was closed. | ||
* The desktop session will end when the JupyterLab session ends. | * The desktop session will end when the JupyterLab session ends. | ||
== Running notebooks as Python scripts == | |||
1. From the console, or in a new notebook cell, install <tt>nbconvert</tt> : | |||
<syntaxhighlight lang="bash">!pip install --no-index nbconvert</syntaxhighlight> | |||
2. Convert your notebooks to Python scripts | |||
<syntaxhighlight lang="bash">!jupyter nbconvert --to python my-current-notebook.ipynb</syntaxhighlight> | |||
3. Create your [[Running_jobs#Use_sbatch_to_submit_jobs|non-interactive submission script]], and submit it. | |||
In your submission script, run your converted notebook with: | |||
<syntaxhighlight lang="bash">python my-current-notebook.py</syntaxhighlight> | |||
And submit your non-interactive job: | |||
{{Command | |||
|sbatch my-submit.sh | |||
}} | |||
= Possible error messages = <!--T:62--> | = Possible error messages = <!--T:62--> |