From 10f3eb65ee9bff650d02b92a2f4cfbda3c3be73d Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 31 Oct 2023 10:21:53 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=9A=20pysqlite3-binary?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 4 ++++ continue_server.py | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index d3ed9bf17..8bfed0fd3 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -107,6 +107,10 @@ jobs: run: | pip install -r server/requirements.txt + - name: Install newer sqlite on linux + run: pip install pysqlite3-binary + if: matrix.os == 'ubuntu-20.04' + - name: Install tiktoken vocab file # Done to avoid extra network request to download the vocab file run: | diff --git a/continue_server.py b/continue_server.py index ec093c8e5..2528ce330 100644 --- a/continue_server.py +++ b/continue_server.py @@ -3,6 +3,17 @@ import sys from server.main import main +# __import__('pysqlite3') +# import sys +# sys.modules['sqlite3'] = sys.modules.pop('pysqlite3') + +# DATABASES = { +# 'default': { +# 'ENGINE': 'django.db.backends.sqlite3', +# 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), +# } +# } + if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"): ca_bundle_path = os.path.join(sys._MEIPASS, "ca_bundle", "cacert.pem") print("Certificates at: ", ca_bundle_path)