Updated notebook to put userdata under a dedicated folder (and some safeties to not nuke them if you double run the script like I did thinking rm -r [symlink] would just remove the symlink

This commit is contained in:
mrq 2023-02-22 15:45:41 +00:00
parent 526a430c2a
commit aa96edde2f

View File

@ -96,21 +96,18 @@
"cell_type":"code",
"source":[
"# only run once, this will save all userdata to your Drive\n",
"# it shouldn't delete through symlinks, but you never know\n",
"\n",
"from google.colab import drive\n",
"drive.mount('/content/drive')\n",
"\n",
"%cd /content/ai-voice-cloning\n",
"!rm -r ./training\n",
"!rm -r ./results\n",
"!rm -r ./voices\n",
"\n",
"!mkdir /content/drive/MyDrive/training/\n",
"!mkdir /content/drive/MyDrive/results/\n",
"!mkdir /content/drive/MyDrive/voices/\n",
"\n",
"!ln -s /content/drive/MyDrive/training/\n",
"!ln -s /content/drive/MyDrive/results/\n",
"!ln -s /content/drive/MyDrive/voices/"
"drive.flush_and_unmount()\n",
"!rm -r ./{training,results,voices,config}\n",
"drive.mount('/content/drive')\n",
"!mkdir /content/drive/MyDrive/ai-voice-cloning/\n",
"!mv /content/drive/MyDrive/{training,results,voices,config} /content/drive/MyDrive/ai-voice-cloning\n",
"!mkdir /content/drive/MyDrive/ai-voice-cloning/{training,results,voices,config}\n",
"!ln -s /content/drive/MyDrive/ai-voice-cloning/{training,results,voices,config} /content/drive/MyDrive/ai-voice-cloning/"
],
"metadata":{
"id":"SGt9gyvubveT"
@ -253,6 +250,7 @@
{
"cell_type":"code",
"source":[
"# if you're not using drive mounting\n",
"%cd /content/ai-voice-cloning\n",
"!apt install -y p7zip-full\n",
"from datetime import datetime\n",