👷 update build scripts with maturin

This commit is contained in:
Nate Sesti 2023-12-02 15:08:50 -08:00
parent 7742438719
commit 335b1e3547
2 changed files with 12 additions and 1 deletions

View file

@ -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

View file

@ -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