Browse Source

Add def file

Jim Madge 3 years ago
parent
commit
18b77f691d

+ 11 - 0
workflows/time_domain_music_source_separation/build.sh

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

+ 31 - 0
workflows/time_domain_music_source_separation/time_domain_music_source_separation.def

@@ -0,0 +1,31 @@
+BootStrap: library
+From: ubuntu:20.04
+
+# Global settings
+%files
+    asteroid/egs/BBCSO/DPTNet/ /
+
+%environment
+    # Add pytorch GAN zoo directory to path
+    export PATH=$PATH:/DPTNet
+
+%post
+    apt-get -y update
+
+    # Add universe repository (necessary for python3-pip)
+    apt-get -y install software-properties-common
+    add-apt-repository -y -u universe
+
+    # Install python packages
+    apt-get -y install python3 python3-pip
+
+    # Make Python scripts executable
+    cd /DPTNet
+    pwd
+    ls
+    for i in *.py; do sed -i "1s|^|#!/usr/bin/env python3\n|" $i; done
+    chmod a+x *.py
+
+    # Install python dependencies
+    pip3 install --no-cache-dir torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
+    pip3 install asteroid==0.3.0