mkandes / galyleo

A shell utility to help you launch Jupyter notebooks on high-performance computing systems in a simple, secure way.
36 stars 7 forks source link

Make command-line parsing of launch options more robust #30

Open mkandes opened 8 months ago

mkandes commented 8 months ago

For example, the --env-modules option will fail when loading multiple modules and place a space in a comma-separated list.

[mkandes@login02 ~]$ export PATH="/cm/shared/apps/sdsc/galyleo:${PATH}"
[mkandes@login02 ~]$ galyleo launch --account use300 --partition shared --cpus 2 --memory 4 --time-limit 00:30:00 --env-modules cpu/0.17.3b, anaconda3/2021.05
ERROR :: Command-line option anaconda3/2021.05 not recognized or not supported.
ERROR :: galyleo_launch command failed.
[mkandes@login02 ~]$ galyleo launch --account use300 --partition shared --cpus 2 --memory 4 --time-limit 00:30:00 --env-modules cpu/0.17.3b,anaconda3/2021.05
Preparing galyleo for launch into Jupyter orbit ...
Listing all launch parameters ...
  command-line options       : values
    -A | --account           : use300
    -R | --reservation       : 
    -p | --partition         : shared
    -q | --qos               : 
    -N | --nodes             : 1
    -c | --cpus              : 2
    -m | --memory            : 4 GB
    -g | --gpus              : 
       | --gres              : 
    -t | --time-limit        : 00:30:00
    -C | --constraint        : 
    -j | --jupyter           : lab
    -d | --notebook-dir      : 
       | --scratch-dir       : "/scratch/${USER}/job_${SLURM_JOB_ID}"
    -e | --env-modules       : cpu/0.17.3b,anaconda3/2021.05
    -s | --sif               : 
    -B | --bind              : 
       | --nv                : 
       | --conda-init        : 
       | --conda-env         : 
       | --conda-yml         : 
       | --conda-version     : latest
       | --mamba             : false
       | --cache             : false
       | --spark-home        : 
       | --disable-checklist : false
       | --checklist-timeout : 10 s
    -Q | --quiet             : 1
Your token is 
hurling-impose-headstand
200
Generating Jupyter launch script ...
Submitted Jupyter launch script to Slurm. Your SLURM_JOB_ID is 29140433.
Success! Token linked to jobid.
Please copy and paste the HTTPS URL provided below into your web browser.
Do not share this URL with others. It is the password to your Jupyter notebook session.
Your Jupyter notebook session will begin once compute resources are allocated to your job by the scheduler.
https://hurling-impose-headstand.expanse-user-content.sdsc.edu?token=7261f043f897ad2253f875f7e

See https://sdsc.zendesk.com/agent/tickets/34202