diff --git a/bin/slurm_calibrate.sh b/bin/slurm_calibrate.sh index 05a04cba4e88fec483f37b293e8aba569b7f5a1a..9e5088757b161bb0206da82517a2f1fd6210184a 100755 --- a/bin/slurm_calibrate.sh +++ b/bin/slurm_calibrate.sh @@ -10,6 +10,7 @@ caltype=$6 final=$7 finalize=$8 cluster_cores=$9 +notebook_python_path=$10 echo "Running with the following parameters:" echo "Notebook path: $nb_path" @@ -43,8 +44,8 @@ fi echo "Running notebook" -${python_path} -m princess ${nb_path} --save --on-error-resume-next -${python_path} -m nbconvert --to rst --TemplateExporter.exclude_input=True ${nb_path} +${notebook_python_path} -m princess ${nb_path} --save --on-error-resume-next +${notebook_python_path} -m nbconvert --to rst --TemplateExporter.exclude_input=True ${nb_path} # stop the cluster if requested if [ "${ipcluster_profile}" != "NO_CLUSTER" ] diff --git a/src/xfel_calibrate/calibrate.py b/src/xfel_calibrate/calibrate.py index 109cdbd82f3f4df0897b59e25c571031e96f7285..4068a07b66bfc13128dfcf01dc7d57a58a740ef8 100755 --- a/src/xfel_calibrate/calibrate.py +++ b/src/xfel_calibrate/calibrate.py @@ -757,14 +757,15 @@ def concurrent_run( srun_base += [ os.path.join(PKG_DIR, "bin", "slurm_calibrate.sh"), # path to helper sh os.path.abspath(nbpath), # path to notebook - user_venv + "/bin/python" if user_venv else python_path, # path to python + python_path, # path to python cluster_profile, '"{}"'.format(base_name.upper()), '"{}"'.format(args["detector"].upper()), '"{}"'.format(args["type"].upper()), "FINAL" if final_job else "NONFINAL", "{}/finalize.py".format(os.path.abspath(temp_path)), - str(cluster_cores) + str(cluster_cores), + user_venv + "/bin/python" if user_venv else python_path # used for nb execution ] output = check_output(srun_base).decode('utf8')