Charflow

Singularity python wrapper script pointing to interpreter

Apr 15th, 2023
1,098
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.45 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. # Save the command-line arguments passed to the script
  4. args="$@"
  5.  
  6. module load singularity
  7.  
  8. # Specify location to python on the singularity container
  9. singularity_python_interpreter="/opt/ohpc/pub/libs/singularity/3.4.1/bin/singularity exec --nv /opt/itu/containers/tensorflow/latest python"
  10.  
  11. # Execute python using a node with GPU
  12. srun --cpus-per-task=2 --time=10:00:00 --partition=brown --gres=gpu:1 $singularity_python_interpreter $args
Advertisement
Add Comment
Please, Sign In to add comment