Skip to content

Commit

Permalink
🐛 build script fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sestinj committed Oct 24, 2023
1 parent fb37cfb commit 7b0b10c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ jobs:
pip install -r server/requirements.txt
- name: Install tiktoken vocab file
# Done to avoid extra network request to download the vocab file
run: |
mkdir .tiktoken_cache
curl -o .tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 https://s3.us-west-1.amazonaws.com/s3.continue.dev/tiktoken/9b5ad71b2ce5302211f9c61530b329a4922fc6a4
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ jobs:
pip install -r server/requirements.txt
- name: Install tiktoken vocab file
# Done to avoid extra network request to download the vocab file
run: |
mkdir .tiktoken_cache
curl -o .tiktoken_cache/9b5ad71b2ce5302211f9c61530b329a4922fc6a4 https://s3.us-west-1.amazonaws.com/s3.continue.dev/tiktoken/9b5ad71b2ce5302211f9c61530b329a4922fc6a4
Expand Down
7 changes: 6 additions & 1 deletion build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ rmdir /s /q build
rmdir /s /q env
rmdir /s /q dist
rmdir /s /q server\.venv
rmdir /s /q .tiktoken_cache

REM 2. Create a new virtual environment and activate it
python -m venv env
Expand All @@ -13,7 +14,11 @@ call env\Scripts\activate
REM 3. Install the required packages
pip install -r server\requirements.txt

pip install pyinstaller
pip install pyinstaller || exit /b 1
pip install certifi || exit /b 1

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
env\Scripts\pyinstaller continue_server.spec
Expand Down
9 changes: 7 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ rm -rf build
rm -rf env
rm -rf dist
rm -rf server/.venv
rm -rf .tiktoken_cache

# 2. Create a new virtual environment and activate it
python3 -m venv env
. env/bin/activate

# 3. Install the required packages
pip install -r server/requirements.txt
pip install pyinstaller
pip install -r server/requirements.txt || exit 1
pip install pyinstaller || exit 1
pip install certifi || exit 1

# 4. Detect M1 architecture or allow manual override
USE_ARCH="intel"
Expand All @@ -33,6 +35,9 @@ else
fi
fi

# 4.5. Make .tiktoken_cache directory, used to package with tiktoken vocab file
mkdir .tiktoken_cache

# 5. Call PyInstaller from within the virtual environment
env/bin/pyinstaller continue_server.spec -- --arch $USE_ARCH

Expand Down

0 comments on commit 7b0b10c

Please sign in to comment.