[RESOLVED] Eddy_cuda will not run in qunex_container

Dear Jure and QuNex experts:

I was trying to run hcp_diffusion (and all other HCP preprocessing pipelines) using qunex_container. However, it returned with error (error_hcp_diffusion_001B_2022-08-18_07.18.22.077156.log (52.6 KB)
see attached). It appeared that eddy_cuda would not run. Please find below my script for calling the qunex container for your reference:

PATH=${HOME}/qunex:${PATH}
export STUDY_NAME="cimt"
export WORK_DIR="${HOME}/qunex"
export QUNEX_CONTAINER="${WORK_DIR}/qunexcontainer/qunex_suite-0.93.6.sif"
export RAW_DATA="${WORK_DIR}/data"
export INPUT_BATCH_FILE="${RAW_DATA}/006_batch.txt"
export INPUT_MAPPING_FILE="${RAW_DATA}/006_mapping.txt"
export SESSIONS="001A,001B,001C,001D,002A,002B,002C,003A,003B,003C,003D,004A,004B,004C,006A,006C"
export RUNTURNKEY_TYPE="local"
export RUNTURNKEY_STEPS="create_study,map_raw_data,import_dicom,create_session_info,setup_hcp,create_batch,hcp_pre_freesurfer,hcp_freesurfer,hcp_post_freesurfer,hcp_fmri_volume,hcp_fmri_surface,hcp_diffusion,map_hcp_data,create_bold_brain_masks,compute_bold_stats,create_stats_report,extract_nuisance_signal,preprocess_bold"

qunex_container run_turnkey   --rawdatainput="${RAW_DATA}"   --batchfile="${INPUT_BATCH_FILE}"   --mappingfile="${INPUT_MAPPING_FILE}"   --workingdir="${WORK_DIR}"   --projectname="${STUDY_NAME}"   --path="${WORK_DIR}/${STUDY_NAME}"   --sessions="${SESSIONS}"   --sessionids="${SESSIONS}"   --sessionsfoldername="sessions"   --turnkeytype="${RUNTURNKEY_TYPE}"   --container="${QUNEX_CONTAINER}"  --turnkeysteps="${RUNTURNKEY_STEPS}" --overwrite="yes"

However when I tried to run the exact same eddy_cuda command from terminal, eddy_cuda successfully ran. So I was wondering if you could kindly tell me what was the root cause of this?

Any help would be greatly appreciated.

Many thanks,
Edward

Hi Edward,

when using Singularity and commands that need a GPU, you have to add the --nv flag to the qunex_container call. This way the environment inside the container will have access to the required libraries (CUDA) of your system. Let me know if this does not fix the issue.

Hi Jure:

It worked! Thanks so much for your help as always!

Best,
Ed