From 82b35492afee3f0e004301facd7252e7b0f4bdcd Mon Sep 17 00:00:00 2001 From: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com> Date: Fri, 13 Sep 2024 17:18:44 +0200 Subject: [PATCH] pep8 --- backend/open_webui/__init__.py | 1 + backend/open_webui/env.py | 1 + 2 files changed, 2 insertions(+) diff --git a/backend/open_webui/__init__.py b/backend/open_webui/__init__.py index 743656d9e..167f0fb60 100644 --- a/backend/open_webui/__init__.py +++ b/backend/open_webui/__init__.py @@ -41,6 +41,7 @@ def serve( ) try: import torch + assert torch.cuda.is_available(), "CUDA not available" typer.echo("CUDA seems to be working") except Exception as e: diff --git a/backend/open_webui/env.py b/backend/open_webui/env.py index df5597cbf..cf45e725c 100644 --- a/backend/open_webui/env.py +++ b/backend/open_webui/env.py @@ -38,6 +38,7 @@ USE_CUDA = os.environ.get("USE_CUDA_DOCKER", "false") if USE_CUDA.lower() == "true": try: import torch + assert torch.cuda.is_available(), "CUDA not available" DEVICE_TYPE = "cuda" except Exception as e: