Browse Source

Add build script

Jim Madge 3 years ago
parent
commit
0715dbea77
1 changed files with 11 additions and 0 deletions
  1. 11 0
      workflows/pytorch_GAN_zoo/build.sh

+ 11 - 0
workflows/pytorch_GAN_zoo/build.sh

@@ -0,0 +1,11 @@
+#!/bin/sh
+
+UID=$(id -u)
+DEF_FILE="pytorch_GAN_zoo.def"
+SIF_FILE="pytorch_GAN_zoo.sif"
+
+if [ "$UID" = 0 ]; then
+    singularity build $SIF_FILE $DEF_FILE
+else
+    singularity build --fakeroot $SIF_FILE $DEF_FILE
+fi