From 335b1e35474359ce31edbbb2d385f917cb27aa1b Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Sat, 2 Dec 2023 15:08:50 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20update=20build=20scripts=20with?= =?UTF-8?q?=20maturin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.cmd | 7 ++++++- build.sh | 6 ++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/build.cmd b/build.cmd index a3b72b125..91873c5bb 100644 --- a/build.cmd +++ b/build.cmd @@ -15,11 +15,16 @@ REM 3. Install the required packages pip install -r server\requirements.txt pip install pyinstaller || exit /b 1 +pip install maturin || exit /b 1 + +REM 4. Build the Rust library +cd server +env\Scripts\maturin develop REM 4.5. Make .tiktoken_cache directory, used to package with tiktoken vocab file mkdir .tiktoken_cache -REM 4. Call PyInstaller from within the virtual environment +REM 4.75. Call PyInstaller from within the virtual environment env\Scripts\pyinstaller continue_server.spec REM 5. Deactivate the virtual environment diff --git a/build.sh b/build.sh index 08b88e151..18a3264a8 100755 --- a/build.sh +++ b/build.sh @@ -14,6 +14,7 @@ python3 -m venv env # 3. Install the required packages pip install -r server/requirements.txt || exit 1 pip install pyinstaller || exit 1 +pip install maturin || exit 1 # 4. Detect M1 architecture or allow manual override USE_ARCH="intel" @@ -34,6 +35,11 @@ else fi fi +# 4.25. Build the Rust library +cd server +maturin develop +cd .. + # 4.5. Make .tiktoken_cache directory, used to package with tiktoken vocab file mkdir .tiktoken_cache