From fd24d959810768e58680486950c86fe055577bb6 Mon Sep 17 00:00:00 2001 From: henk717 Date: Sun, 5 Nov 2023 01:42:13 +0100 Subject: [PATCH] Crash without a GPU --- colab/GPU.ipynb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/colab/GPU.ipynb b/colab/GPU.ipynb index 03ba5730..a4fe28bd 100644 --- a/colab/GPU.ipynb +++ b/colab/GPU.ipynb @@ -70,6 +70,10 @@ "Provider = \"Cloudflare\" #@param [\"Localtunnel\", \"Cloudflare\"]\n", "use_google_drive = True #@param {type:\"boolean\"}\n", "\n", + "import os\n", + "if not os.path.isfile(\"/opt/bin/nvidia-smi\"):\n", + " raise RuntimeError(\"⚠️Colab did not give you a GPU due to usage limits, this can take a few hours before they let you back in. Check out https://lite.koboldai.net for a free alternative (that does not provide an API link but can load KoboldAI saves and chat cards) or subscribe to Colab Pro for immediate access.⚠️\")\n", + "\n", "!nvidia-smi\n", "from google.colab import drive\n", "if use_google_drive:\n",