From d530cb7ced38cfcc0b272d997f9213c4209e6ede Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Wed, 22 Feb 2023 18:31:39 -0500 Subject: [PATCH 01/23] added new texture? unteste --- AugmentedNet/texturizers.py | 33 ++++++++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/AugmentedNet/texturizers.py b/AugmentedNet/texturizers.py index 0ab94a34..244451bc 100644 --- a/AugmentedNet/texturizers.py +++ b/AugmentedNet/texturizers.py @@ -218,6 +218,32 @@ def templateSeventh(self): """ +class AuxilaryNotes(TextureTemplate): + """A syncopated pattern to separate the upper voice from the rest. + + The highest note is played in isolation, + followed by the remaining lower notes, + played in syncopation.""" + + supported_durations = [1.0] + + def templateTriad(self): + dur = self.duration / 4 + return f"""\ +0.0,{dur},,"['{self.notes[0]}', '{self.notes[1]}', '{self.notes[2]}']","['{self.intervals[0]}', '{self.intervals[1]}']","[True, True, True]" +{dur},{dur},,['{self.notes[2].transpose(-1, inPlace=True)}'],[],[True] +{dur*2},{dur*2},,['{self.notes[2]}'],[],[True] +""" + + def templateSeventh(self): + dur = self.duration / 4 + return f"""\ +0.0,{dur},,"['{self.notes[0]}', '{self.notes[1]}', '{self.notes[2]}', '{self.notes[3]}']","['{self.intervals[0]}', '{self.intervals[1]}', '{self.intervals[2]}']","[True, True, True, True]" +{dur},{dur},,['{self.notes[3].transpose(-1, inPlace=True)}'],[],[True] +{dur*2},{dur*2},,['{self.notes[3]}'],[],[True] +""" + + class BlockChord(TextureTemplate): """A block-chord texture. The default texture in music21-generated scores.""" @@ -235,10 +261,11 @@ def templateSeventh(self): available_templates = { - "BassSplit": BassSplit, - "Alberti": Alberti, - "Syncopation": Syncopation, + # "BassSplit": BassSplit, + # "Alberti": Alberti, + # "Syncopation": Syncopation, "BlockChord": BlockChord, + "AuxilaryNotes": AuxilaryNotes, } available_durations = list( From b4962017e263211ea3e81a7f4a662734ae340e3a Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Fri, 3 Mar 2023 16:28:07 -0500 Subject: [PATCH 02/23] fixed texture, tested! --- AugmentedNet/texturizers.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/AugmentedNet/texturizers.py b/AugmentedNet/texturizers.py index 244451bc..1ee11b41 100644 --- a/AugmentedNet/texturizers.py +++ b/AugmentedNet/texturizers.py @@ -1,6 +1,7 @@ """Templates for texturizing annotation files and turn them into scores.""" import random +from music21 import note class TextureTemplate(object): @@ -228,18 +229,26 @@ class AuxilaryNotes(TextureTemplate): supported_durations = [1.0] def templateTriad(self): + transposedNote = note.Note(self.notes[2]).transpose(-1).nameWithOctave + print(self.notes) + print(self.notes[2]) + print(transposedNote) dur = self.duration / 4 return f"""\ 0.0,{dur},,"['{self.notes[0]}', '{self.notes[1]}', '{self.notes[2]}']","['{self.intervals[0]}', '{self.intervals[1]}']","[True, True, True]" -{dur},{dur},,['{self.notes[2].transpose(-1, inPlace=True)}'],[],[True] +{dur},{dur},,['{transposedNote}'],[],[True] {dur*2},{dur*2},,['{self.notes[2]}'],[],[True] """ def templateSeventh(self): + transposedNote = note.Note(self.notes[3]).transpose(-1).nameWithOctave + print(self.notes) + print(self.notes[3]) + print(transposedNote) dur = self.duration / 4 return f"""\ 0.0,{dur},,"['{self.notes[0]}', '{self.notes[1]}', '{self.notes[2]}', '{self.notes[3]}']","['{self.intervals[0]}', '{self.intervals[1]}', '{self.intervals[2]}']","[True, True, True, True]" -{dur},{dur},,['{self.notes[3].transpose(-1, inPlace=True)}'],[],[True] +{dur},{dur},,['{transposedNote}'],[],[True] {dur*2},{dur*2},,['{self.notes[3]}'],[],[True] """ From b55ce54ba2f6aaf4301960972b2166563fad0e54 Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Fri, 3 Mar 2023 19:59:27 -0500 Subject: [PATCH 03/23] Fix typo Co-authored-by: Prabhat Nagarajan --- AugmentedNet/texturizers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AugmentedNet/texturizers.py b/AugmentedNet/texturizers.py index 1ee11b41..955b05a4 100644 --- a/AugmentedNet/texturizers.py +++ b/AugmentedNet/texturizers.py @@ -219,7 +219,7 @@ def templateSeventh(self): """ -class AuxilaryNotes(TextureTemplate): +class AuxiliaryNotes(TextureTemplate): """A syncopated pattern to separate the upper voice from the rest. The highest note is played in isolation, @@ -274,7 +274,7 @@ def templateSeventh(self): # "Alberti": Alberti, # "Syncopation": Syncopation, "BlockChord": BlockChord, - "AuxilaryNotes": AuxilaryNotes, + "AuxiliaryNotes": AuxiliaryNotes, } available_durations = list( From 3869967d5352c074744ae822de803ee06c705677 Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Fri, 3 Mar 2023 21:04:07 -0500 Subject: [PATCH 04/23] added intervals & isOnSet to the returning value --- AugmentedNet/texturizers.py | 31 ++++++++++++++----------------- 1 file changed, 14 insertions(+), 17 deletions(-) diff --git a/AugmentedNet/texturizers.py b/AugmentedNet/texturizers.py index 1ee11b41..a5aae17c 100644 --- a/AugmentedNet/texturizers.py +++ b/AugmentedNet/texturizers.py @@ -2,6 +2,7 @@ import random from music21 import note +from music21 import interval class TextureTemplate(object): @@ -220,36 +221,32 @@ def templateSeventh(self): class AuxilaryNotes(TextureTemplate): - """A syncopated pattern to separate the upper voice from the rest. + """TODO: Add first line - The highest note is played in isolation, - followed by the remaining lower notes, - played in syncopation.""" + TODO: Add details""" - supported_durations = [1.0] + supported_durations = [1.0, 2.0] def templateTriad(self): - transposedNote = note.Note(self.notes[2]).transpose(-1).nameWithOctave - print(self.notes) - print(self.notes[2]) - print(transposedNote) + transposed_note = note.Note(self.notes[2]).transpose(-1) + transposed_name = transposed_note.nameWithOctave + transposed_interval = interval.Interval(noteStart=note.Note(self.notes[0]), noteEnd=transposed_note).name dur = self.duration / 4 return f"""\ 0.0,{dur},,"['{self.notes[0]}', '{self.notes[1]}', '{self.notes[2]}']","['{self.intervals[0]}', '{self.intervals[1]}']","[True, True, True]" -{dur},{dur},,['{transposedNote}'],[],[True] -{dur*2},{dur*2},,['{self.notes[2]}'],[],[True] +{dur},{dur},,"['{self.notes[0]}', '{self.notes[1]}', '{transposed_name}']","['{self.intervals[0]}', '{transposed_interval}']","[False, False, True]" +{dur*2},{dur*2},,"['{self.notes[0]}', '{self.notes[1]}', '{self.notes[2]}']","['{self.intervals[0]}', '{self.intervals[1]}']","[False, False, True]" """ def templateSeventh(self): - transposedNote = note.Note(self.notes[3]).transpose(-1).nameWithOctave - print(self.notes) - print(self.notes[3]) - print(transposedNote) + transposed_note = note.Note(self.notes[3]).transpose(-1) + transposed_name = transposed_note.nameWithOctave + transposed_interval = interval.Interval(noteStart=note.Note(self.notes[0]), noteEnd=transposed_note).name dur = self.duration / 4 return f"""\ 0.0,{dur},,"['{self.notes[0]}', '{self.notes[1]}', '{self.notes[2]}', '{self.notes[3]}']","['{self.intervals[0]}', '{self.intervals[1]}', '{self.intervals[2]}']","[True, True, True, True]" -{dur},{dur},,['{transposedNote}'],[],[True] -{dur*2},{dur*2},,['{self.notes[3]}'],[],[True] +{dur},{dur},,"['{self.notes[0]}', '{self.notes[1]}', '{self.notes[2]}', '{transposed_name}']","['{self.intervals[0]}', '{self.intervals[1]}', '{transposed_interval}']","[False, False, False, True]" +{dur*2},{dur*2},,"['{self.notes[0]}', '{self.notes[1]}', '{self.notes[2]}', '{self.notes[3]}']","['{self.intervals[0]}', '{self.intervals[1]}', '{self.intervals[2]}']","[False, False, False, True]" """ From d0624335700d1dc44b133d9cd6449f80f6cac79a Mon Sep 17 00:00:00 2001 From: Arisa Okamura Date: Thu, 9 Mar 2023 00:37:42 +0000 Subject: [PATCH 05/23] bash script setup.sh --- setup.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 setup.sh diff --git a/setup.sh b/setup.sh new file mode 100755 index 00000000..bf6b16cc --- /dev/null +++ b/setup.sh @@ -0,0 +1,28 @@ +#!/bin/bash +cd ~/.ssh +#ssh-keygen -t rsa +#cat id_rsa.pub +#ssh -T git@github.com +cd ~/ +#git clone --recursive git@github.com:Alicelavander/AugmentedNet.git +wget https://github.com/napulen/AugmentedNet/archive/refs/heads/main.zip +unzip main.zip +mv AugmentedNet-main AugmentedNet +#python --version +#python3 --version +wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb +sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub +sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb +sudo apt-get update +sudo apt-get install cuda-10-0 +cd AugmentedNet/ +#python3 -m venv .env +#sudo apt install python3.8-venv +#python3 -m venv .env +#source .env/bin/activate +#pip install -r requirements.txt +#wget https://github.com/napulen/AugmentedNet/releases/latest/download/dataset.zip +#unzip dataset.zip +#sudo apt install unzip +#unzip dataset.zip + From 6927a9c38c2656031a0f8c30b1c8b4cdd3ae27e6 Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Thu, 9 Mar 2023 10:13:39 +0900 Subject: [PATCH 06/23] Update setup.sh --- setup.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/setup.sh b/setup.sh index bf6b16cc..b4df2cd0 100755 --- a/setup.sh +++ b/setup.sh @@ -6,15 +6,18 @@ cd ~/.ssh cd ~/ #git clone --recursive git@github.com:Alicelavander/AugmentedNet.git wget https://github.com/napulen/AugmentedNet/archive/refs/heads/main.zip +apt install unzip unzip main.zip mv AugmentedNet-main AugmentedNet #python --version #python3 --version -wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb -sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub -sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb +wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-12-1_12.1.0-1_amd64.deb +apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub +#wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb +#sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub +sudo dpkg -i cuda-12-1_12.1.0-1_amd64.deb sudo apt-get update -sudo apt-get install cuda-10-0 +sudo apt-get install cuda-12-1 cd AugmentedNet/ #python3 -m venv .env #sudo apt install python3.8-venv @@ -25,4 +28,3 @@ cd AugmentedNet/ #unzip dataset.zip #sudo apt install unzip #unzip dataset.zip - From ff614ed3d11b2624159bb5de8dd54268c29ce1c8 Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Fri, 10 Mar 2023 12:32:47 +0900 Subject: [PATCH 07/23] Update setup.sh --- setup.sh | 39 ++++++++++++++++++++++++++------------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/setup.sh b/setup.sh index b4df2cd0..219e4427 100755 --- a/setup.sh +++ b/setup.sh @@ -1,30 +1,43 @@ -#!/bin/bash +#!/bin/bash + +#setup CUDA & cuDNN +apt install gcc +apt-get install linux-headers-$(uname -r) +wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin +mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 +https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda-repo-ubuntu2004-12-1-local_12.1.0-530.30.02-1_amd64.deb +dpkg -i cuda-repo-ubuntu2004-12-1-local_12.1.0-530.30.02-1_amd64.deb +cp /var/cuda-repo-ubuntu2004-12-1-local/cuda-*-keyring.gpg /usr/share/keyrings/ +apt-get update +apt-get -y install cuda +apt install nvidia-cuda-toolkit +apt-get install zlib1g +apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub +add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" +apt-get update +apt-get install libcudnn8=8.8.0.121-1+cuda12.0 +apt-get autoremove +nvidia-smi + +#setup ssh for GitHub cd ~/.ssh #ssh-keygen -t rsa #cat id_rsa.pub #ssh -T git@github.com + +#setup AugmentedNet cd ~/ #git clone --recursive git@github.com:Alicelavander/AugmentedNet.git wget https://github.com/napulen/AugmentedNet/archive/refs/heads/main.zip apt install unzip unzip main.zip mv AugmentedNet-main AugmentedNet -#python --version -#python3 --version -wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-12-1_12.1.0-1_amd64.deb -apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub -#wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb -#sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub -sudo dpkg -i cuda-12-1_12.1.0-1_amd64.deb -sudo apt-get update -sudo apt-get install cuda-12-1 cd AugmentedNet/ -#python3 -m venv .env -#sudo apt install python3.8-venv +#apt install python3.8-venv #python3 -m venv .env #source .env/bin/activate #pip install -r requirements.txt #wget https://github.com/napulen/AugmentedNet/releases/latest/download/dataset.zip #unzip dataset.zip -#sudo apt install unzip +#apt install unzip #unzip dataset.zip From e894918d135acc242ece5894667e61aa3daf6b27 Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Fri, 10 Mar 2023 12:44:40 +0900 Subject: [PATCH 08/23] Update setup.sh --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 219e4427..da48c062 100755 --- a/setup.sh +++ b/setup.sh @@ -5,7 +5,7 @@ apt install gcc apt-get install linux-headers-$(uname -r) wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 -https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda-repo-ubuntu2004-12-1-local_12.1.0-530.30.02-1_amd64.deb +wget https://developer.download.nvidia.com/compute/cuda/12.1.0/local_installers/cuda-repo-ubuntu2004-12-1-local_12.1.0-530.30.02-1_amd64.deb dpkg -i cuda-repo-ubuntu2004-12-1-local_12.1.0-530.30.02-1_amd64.deb cp /var/cuda-repo-ubuntu2004-12-1-local/cuda-*-keyring.gpg /usr/share/keyrings/ apt-get update From c0df8cf2b6eadd91d0f8621eeea65c6f17537a0f Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Fri, 10 Mar 2023 13:04:34 +0900 Subject: [PATCH 09/23] cleanup setup.sh --- setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index da48c062..6dcbaddd 100755 --- a/setup.sh +++ b/setup.sh @@ -11,13 +11,11 @@ cp /var/cuda-repo-ubuntu2004-12-1-local/cuda-*-keyring.gpg /usr/share/keyrings/ apt-get update apt-get -y install cuda apt install nvidia-cuda-toolkit -apt-get install zlib1g apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" apt-get update apt-get install libcudnn8=8.8.0.121-1+cuda12.0 apt-get autoremove -nvidia-smi #setup ssh for GitHub cd ~/.ssh @@ -41,3 +39,5 @@ cd AugmentedNet/ #unzip dataset.zip #apt install unzip #unzip dataset.zip + +nvidia-smi From 60093d17871f2507aeb9a2fcef29853e0825a3f9 Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Sat, 18 Mar 2023 08:31:08 +0900 Subject: [PATCH 10/23] Update setup.sh --- setup.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 6dcbaddd..cc55bf0c 100755 --- a/setup.sh +++ b/setup.sh @@ -18,7 +18,7 @@ apt-get install libcudnn8=8.8.0.121-1+cuda12.0 apt-get autoremove #setup ssh for GitHub -cd ~/.ssh +#cd ~/.ssh #ssh-keygen -t rsa #cat id_rsa.pub #ssh -T git@github.com @@ -40,4 +40,4 @@ cd AugmentedNet/ #apt install unzip #unzip dataset.zip -nvidia-smi +#nvidia-smi From 42cf463588219bdc11bdfcb079aa01548b9b0df3 Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Sat, 18 Mar 2023 09:11:43 +0900 Subject: [PATCH 11/23] Update README.md --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 664aaf73..9b7af9d6 100644 --- a/README.md +++ b/README.md @@ -244,3 +244,8 @@ These are the results for the best AugmentedNet configuration (11+) against othe | BPS | BPS | CS18 | 66.7 | 51.8 | 60.6 | 59.1 | - | - | 25.7 | - | **[Visualize experiments in TensorBoard.dev!](https://tensorboard.dev/experiment/fXVA71nWTkSZh6CqTXCeCw/#scalars)** + +## How to run on Google Cloud VM + +1. `wget https://github.com/Alicelavander/AugmentedNet/raw/setup/setup.sh` +2. `sudo ./setup.sh ${pwd}` From e3ea039c0cb37c1e8f4c1cacfc3e18f5de8a9090 Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Sat, 18 Mar 2023 09:13:22 +0900 Subject: [PATCH 12/23] Update setup.sh --- setup.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index cc55bf0c..ec18f393 100755 --- a/setup.sh +++ b/setup.sh @@ -1,4 +1,5 @@ #!/bin/bash +HOME=$1 #setup CUDA & cuDNN apt install gcc @@ -18,13 +19,13 @@ apt-get install libcudnn8=8.8.0.121-1+cuda12.0 apt-get autoremove #setup ssh for GitHub -#cd ~/.ssh +#cd $HOME/.ssh #ssh-keygen -t rsa #cat id_rsa.pub #ssh -T git@github.com #setup AugmentedNet -cd ~/ +cd $HOME #git clone --recursive git@github.com:Alicelavander/AugmentedNet.git wget https://github.com/napulen/AugmentedNet/archive/refs/heads/main.zip apt install unzip From d635527a6b9fb44c276f348e0ffd4592f794d8ae Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Sat, 18 Mar 2023 09:32:34 +0900 Subject: [PATCH 13/23] Update README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9b7af9d6..053956fe 100644 --- a/README.md +++ b/README.md @@ -248,4 +248,5 @@ These are the results for the best AugmentedNet configuration (11+) against othe ## How to run on Google Cloud VM 1. `wget https://github.com/Alicelavander/AugmentedNet/raw/setup/setup.sh` -2. `sudo ./setup.sh ${pwd}` +2. `chmod +x setup.sh` +2. `sudo ./setup.sh $(pwd)` From cde20800260c75e639aee9f20fbbb030e395e327 Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Thu, 23 Mar 2023 09:00:45 +0900 Subject: [PATCH 14/23] Update setup.sh --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index ec18f393..f5a16e02 100755 --- a/setup.sh +++ b/setup.sh @@ -32,7 +32,7 @@ apt install unzip unzip main.zip mv AugmentedNet-main AugmentedNet cd AugmentedNet/ -#apt install python3.8-venv +apt install python3.8-venv #python3 -m venv .env #source .env/bin/activate #pip install -r requirements.txt From f0a1a6f2bd6cafdef285ca76ade3f10558f1a61b Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Sat, 25 Mar 2023 21:04:16 -0400 Subject: [PATCH 15/23] Update setup.sh --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index f5a16e02..ec18f393 100755 --- a/setup.sh +++ b/setup.sh @@ -32,7 +32,7 @@ apt install unzip unzip main.zip mv AugmentedNet-main AugmentedNet cd AugmentedNet/ -apt install python3.8-venv +#apt install python3.8-venv #python3 -m venv .env #source .env/bin/activate #pip install -r requirements.txt From 7969571057121ac76cace509abbc9c76d5e9ef80 Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Sun, 26 Mar 2023 19:38:49 -0400 Subject: [PATCH 16/23] Update setup.sh --- setup.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.sh b/setup.sh index ec18f393..7ee852a1 100755 --- a/setup.sh +++ b/setup.sh @@ -32,6 +32,8 @@ apt install unzip unzip main.zip mv AugmentedNet-main AugmentedNet cd AugmentedNet/ +wget https://repo.anaconda.com/miniconda/Miniconda3-py38_23.1.0-1-Linux-x86_64.sh +bash https://repo.anaconda.com/miniconda/Miniconda3-py38_23.1.0-1-Linux-x86_64.sh #apt install python3.8-venv #python3 -m venv .env #source .env/bin/activate From 270e38d7381b91f5d0e65cc186ddba96b6694f9a Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Sun, 26 Mar 2023 20:24:03 -0400 Subject: [PATCH 17/23] Update setup.sh --- setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.sh b/setup.sh index 7ee852a1..7101af47 100755 --- a/setup.sh +++ b/setup.sh @@ -33,7 +33,7 @@ unzip main.zip mv AugmentedNet-main AugmentedNet cd AugmentedNet/ wget https://repo.anaconda.com/miniconda/Miniconda3-py38_23.1.0-1-Linux-x86_64.sh -bash https://repo.anaconda.com/miniconda/Miniconda3-py38_23.1.0-1-Linux-x86_64.sh +bash Miniconda3-py38_23.1.0-1-Linux-x86_64.sh #apt install python3.8-venv #python3 -m venv .env #source .env/bin/activate From 6b7cbb51979f55011aa7f0270cbf40b6694900a0 Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Sun, 26 Mar 2023 20:36:09 -0400 Subject: [PATCH 18/23] Update setup.sh --- setup.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.sh b/setup.sh index 7101af47..12a1184b 100755 --- a/setup.sh +++ b/setup.sh @@ -34,6 +34,7 @@ mv AugmentedNet-main AugmentedNet cd AugmentedNet/ wget https://repo.anaconda.com/miniconda/Miniconda3-py38_23.1.0-1-Linux-x86_64.sh bash Miniconda3-py38_23.1.0-1-Linux-x86_64.sh +apt install python3-pip #apt install python3.8-venv #python3 -m venv .env #source .env/bin/activate From 8b843c0fea6e873cf9d83ced08438ceed3563010 Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Sun, 26 Mar 2023 21:18:52 -0400 Subject: [PATCH 19/23] separate setup fiels --- setup-augmentednet.sh | 21 +++++++++++++++++++++ setup.sh => setup-cuda.sh | 27 --------------------------- 2 files changed, 21 insertions(+), 27 deletions(-) create mode 100644 setup-augmentednet.sh rename setup.sh => setup-cuda.sh (54%) mode change 100755 => 100644 diff --git a/setup-augmentednet.sh b/setup-augmentednet.sh new file mode 100644 index 00000000..3b7e169e --- /dev/null +++ b/setup-augmentednet.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +#setup ssh for GitHub +#cd $HOME/.ssh +#ssh-keygen -t rsa +#cat id_rsa.pub +#ssh -T git@github.com + +#setup AugmentedNet +#git clone --recursive git@github.com:Alicelavander/AugmentedNet.git +wget https://github.com/napulen/AugmentedNet/archive/refs/heads/main.zip +apt install unzip +unzip main.zip +mv AugmentedNet-main AugmentedNet +cd AugmentedNet/ +wget https://github.com/napulen/AugmentedNet/releases/latest/download/dataset.zip +unzip dataset.zip +wget https://repo.anaconda.com/miniconda/Miniconda3-py38_23.1.0-1-Linux-x86_64.sh +bash Miniconda3-py38_23.1.0-1-Linux-x86_64.sh + +#pip install -r requirements.txt diff --git a/setup.sh b/setup-cuda.sh old mode 100755 new mode 100644 similarity index 54% rename from setup.sh rename to setup-cuda.sh index 12a1184b..ce848e28 --- a/setup.sh +++ b/setup-cuda.sh @@ -1,5 +1,4 @@ #!/bin/bash -HOME=$1 #setup CUDA & cuDNN apt install gcc @@ -18,30 +17,4 @@ apt-get update apt-get install libcudnn8=8.8.0.121-1+cuda12.0 apt-get autoremove -#setup ssh for GitHub -#cd $HOME/.ssh -#ssh-keygen -t rsa -#cat id_rsa.pub -#ssh -T git@github.com - -#setup AugmentedNet -cd $HOME -#git clone --recursive git@github.com:Alicelavander/AugmentedNet.git -wget https://github.com/napulen/AugmentedNet/archive/refs/heads/main.zip -apt install unzip -unzip main.zip -mv AugmentedNet-main AugmentedNet -cd AugmentedNet/ -wget https://repo.anaconda.com/miniconda/Miniconda3-py38_23.1.0-1-Linux-x86_64.sh -bash Miniconda3-py38_23.1.0-1-Linux-x86_64.sh -apt install python3-pip -#apt install python3.8-venv -#python3 -m venv .env -#source .env/bin/activate -#pip install -r requirements.txt -#wget https://github.com/napulen/AugmentedNet/releases/latest/download/dataset.zip -#unzip dataset.zip -#apt install unzip -#unzip dataset.zip - #nvidia-smi From 021200b8cc814698a7236a05322edae89ce86c1b Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Sun, 26 Mar 2023 21:24:05 -0400 Subject: [PATCH 20/23] install setup-augmentednet.sh at the end --- setup-cuda.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup-cuda.sh b/setup-cuda.sh index ce848e28..c7a7dd1c 100644 --- a/setup-cuda.sh +++ b/setup-cuda.sh @@ -17,4 +17,6 @@ apt-get update apt-get install libcudnn8=8.8.0.121-1+cuda12.0 apt-get autoremove +wget https://github.com/Alicelavander/AugmentedNet/raw/setup/setup-augmentednet.sh + #nvidia-smi From b0deb2b3163c2f2dab77d908440a49cb8fce5e76 Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Sun, 26 Mar 2023 22:17:04 -0400 Subject: [PATCH 21/23] updated instructions for GCP VM setup --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 053956fe..9e9dfa10 100644 --- a/README.md +++ b/README.md @@ -247,6 +247,11 @@ These are the results for the best AugmentedNet configuration (11+) against othe ## How to run on Google Cloud VM -1. `wget https://github.com/Alicelavander/AugmentedNet/raw/setup/setup.sh` -2. `chmod +x setup.sh` -2. `sudo ./setup.sh $(pwd)` +1. `wget https://github.com/Alicelavander/AugmentedNet/raw/setup/setup-cuda.sh` +2. `chmod +x setup-cuda.sh` +3. `sudo ./setup-cuda.sh` +4. `./setup-augmentednet.sh` +5. restart ssh connection +6. `cd AugmentedNet` +7. `conda create -n aha python=3.8` +8. `conda activate aha` From 51d00519bfcca5417e51e1160776f820f1811ef8 Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Sun, 26 Mar 2023 22:30:16 -0400 Subject: [PATCH 22/23] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e9dfa10..1ccb5f5d 100644 --- a/README.md +++ b/README.md @@ -251,7 +251,7 @@ These are the results for the best AugmentedNet configuration (11+) against othe 2. `chmod +x setup-cuda.sh` 3. `sudo ./setup-cuda.sh` 4. `./setup-augmentednet.sh` -5. restart ssh connection +5. `sudo shutdown -r now` 6. `cd AugmentedNet` 7. `conda create -n aha python=3.8` 8. `conda activate aha` From 979c4b9b2b1b3544f562d232e6c5926fc57b05cd Mon Sep 17 00:00:00 2001 From: Alicelavander Date: Sun, 26 Mar 2023 22:37:30 -0400 Subject: [PATCH 23/23] add permission to setup-augmentednet.sh --- setup-cuda.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/setup-cuda.sh b/setup-cuda.sh index c7a7dd1c..24a75527 100644 --- a/setup-cuda.sh +++ b/setup-cuda.sh @@ -18,5 +18,6 @@ apt-get install libcudnn8=8.8.0.121-1+cuda12.0 apt-get autoremove wget https://github.com/Alicelavander/AugmentedNet/raw/setup/setup-augmentednet.sh +chmod +x setup-augmentednet.sh #nvidia-smi