-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build MLC-Chat wheels for apple silicon (#27)
- Loading branch information
Showing
14 changed files
with
61 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
set -u | ||
|
||
cd mlc-llm | ||
rm -f config.cmake | ||
rm -rf build | ||
mkdir -p build | ||
cd build | ||
|
||
MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET:-13.02} | ||
|
||
cmake -DCMAKE_BUILD_TYPE=Release \ | ||
-DCMAKE_OSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET} \ | ||
-DUSE_METAL=ON \ | ||
.. | ||
|
||
make -j12 | ||
cd ../.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#!/bin/bash | ||
set -euxo pipefail | ||
|
||
eval "$(command conda 'shell.bash' 'hook' 2> /dev/null)" | ||
|
||
# Need to first | ||
# - create these enviroments, | ||
# - install dependencies in https://github.com/tlc-pack/tlcpack/blob/main/conda/build-environment.yaml for these env. | ||
declare -a conda_env_names=("wheel-3-8" "wheel-3-9" "wheel-3-10" "wheel-3-11") | ||
|
||
export GITHUB_TOKEN=$1 | ||
|
||
for name in "${conda_env_names[@]}" | ||
do | ||
echo "Start build for $name" | ||
|
||
# conda activate | ||
conda activate $name | ||
|
||
# cleanup and clone mlc-llm | ||
rm -rf mlc-llm && git clone https://github.com/mlc-ai/mlc-llm mlc-llm --recursive --single-branch --branch main | ||
# sync package | ||
python scripts/sync_package.py --package mlc-llm --package-name mlc-chat-nightly --revision origin/main | ||
# build mlc-llm | ||
./scripts/build_mlc_chat_lib_apple_silicon.sh | ||
|
||
# build wheel | ||
cd mlc-llm/python && python setup.py bdist_wheel && cd - | ||
|
||
# deploy wheel | ||
python scripts/wheel_upload.py --repo mlc-ai/package --tag v0.9.dev0 mlc-llm/python/dist | ||
done |
File renamed without changes.
File renamed without changes.