From 449a2f419bc15e7ca3f2ce330e6d9ad556848900 Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Tue, 31 Oct 2023 11:18:28 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=A1=20ci?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/preview.yaml | 30 +++++++++++++++--------------- continue_server.py | 6 +++--- continue_server.spec | 3 ++- 3 files changed, 20 insertions(+), 19 deletions(-) diff --git a/.github/workflows/preview.yaml b/.github/workflows/preview.yaml index 8cfb9c7af..caa3eac58 100644 --- a/.github/workflows/preview.yaml +++ b/.github/workflows/preview.yaml @@ -107,28 +107,28 @@ 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 newer sqlite on linux + run: pip install pysqlite3-binary + if: matrix.os == 'ubuntu-20.04' # Download the latest release of SQLite source code and build the source # amalgamation files (sqlite3.c and sqlite3.h). # Copy the sqlite3 amalgamation files into the root of the pysqlite3 checkout # and run build_static + build: - - name: Install newer sqlite3 on linux - run: | - wget https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=release \ - -O sqlite.tar.gz - tar xzf sqlite.tar.gz - cd sqlite/ - ./configure - make sqlite3.c + # - name: Install newer sqlite3 on linux + # run: | + # wget https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=release \ + # -O sqlite.tar.gz + # tar xzf sqlite.tar.gz + # cd sqlite/ + # ./configure + # make sqlite3.c - cp sqlite/sqlite3.[ch] pysqlite3/ - cd pysqlite3 - python setup.py build_static build - if: matrix.os == 'ubuntu-20.04' + # cp sqlite/sqlite3.[ch] pysqlite3/ + # cd pysqlite3 + # python setup.py build_static build + # if: matrix.os == 'ubuntu-20.04' - name: Install tiktoken vocab file # Done to avoid extra network request to download the vocab file diff --git a/continue_server.py b/continue_server.py index 3acd1a1bd..1f6c228b2 100644 --- a/continue_server.py +++ b/continue_server.py @@ -3,9 +3,9 @@ import sys from server.main import main -# __import__('pysqlite3') -# import sys -# sys.modules['sqlite3'] = sys.modules.pop('pysqlite3') +__import__('pysqlite3') +import sys +sys.modules['sqlite3'] = sys.modules.pop('pysqlite3') if getattr(sys, "frozen", False) and hasattr(sys, "_MEIPASS"): ca_bundle_path = os.path.join(sys._MEIPASS, "ca_bundle", "cacert.pem") diff --git a/continue_server.spec b/continue_server.spec index f160f131e..1f344aca5 100644 --- a/continue_server.spec +++ b/continue_server.spec @@ -55,7 +55,8 @@ a = Analysis( 'chromadb.migrations.embeddings_queue', 'chromadb.migrations.sysdb', 'chromadb.migrations.metadb', 'chromadb.segment.impl', 'chromadb.segment.impl.manager', 'chromadb.segment.impl.manager.local', - 'chromadb.segment.impl.metadata', 'chromadb.segment.impl.metadata.sqlite' + 'chromadb.segment.impl.metadata', 'chromadb.segment.impl.metadata.sqlite', + 'pysqlite3' ], hookspath=[], hooksconfig={},