Skip to content
Snippets Groups Projects
05-simple-test-container-torch2.0.1-rocm5.5.1.sh 1.04 KiB
Newer Older
  • Learn to ignore specific revisions
  • Milan Jaros's avatar
    Milan Jaros committed
    #!/bin/bash -e
    
    # Source: Tools in action by Samuel Antao (AMD)
    # https://docs.lumi-supercomputer.eu/software/packages/pytorch/
    # Contribution: M. Jaros (IT4Innovations)
    
    wd=$(pwd)
    
    #
    # Example assume allocation was created, e.g.:
    # N=1 ; salloc -p standard-g  --threads-per-core 1 --exclusive -N $N --gpus $((N*8)) -t 4:00:00 --mem 0
    #
    
    set -x
    
    # download from https://hub.docker.com/r/rocm/pytorch or use from Samuel Antao:
    
    #SIF=/pfs/lustrep2/projappl/project_462000125/samantao-public/containers/lumi-pytorch-rocm-5.5.1-python-3.10-pytorch-v2.0.1-dockerhash-4305da4654f4.sif
    SIF=/pfs/lustrep2/projappl/project_462000125/samantao-public/containers/lumi-pytorch-rocm-5.5.1-python-3.10-pytorch-v2.0.1-dockerhash-d55f9163ed80.sif
    
    Milan Jaros's avatar
    Milan Jaros committed
    
    # check script
    if [ ! -f $wd/run-me.sh ] ; then
        echo "use 05-install-container-torch2.0.1-rocm5.5.1.sh"
        exit 1
    fi
    
    
    Milan Jaros's avatar
    Milan Jaros committed
      singularity exec \
        -B /var/spool/slurmd:/var/spool/slurmd \
        -B /opt/cray:/opt/cray \
        -B /usr/lib64/libcxi.so.1:/usr/lib64/libcxi.so.1 \
        -B $wd:/workdir \
        $SIF /workdir/run-me.sh