-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sh
More file actions
executable file
·42 lines (33 loc) · 1.33 KB
/
build.sh
File metadata and controls
executable file
·42 lines (33 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash
# Copyright (c) Huawei Technologies Co., Ltd. 2025-2026. All rights reserved.
# MindIE is licensed under Mulan PSL v2.
# You can use this software according to the terms and conditions of the Mulan PSL v2.
# You may obtain a copy of Mulan PSL v2 at:
# http://license.coscl.org.cn/MulanPSL2
# THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
# EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
# MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
# See the Mulan PSL v2 for more details.
set -euo pipefail
# This script builds the motor wheel package.
# Allow verbosity control: set VERBOSE=1 to see full logs.
VERBOSE=${VERBOSE:-0}
# Clean up any existing build artifacts that might cause import issues.
rm -rf build/
rm -rf motor.egg-info/
rm -rf dist/
echo "Generating protobuf files..."
./scripts/generate_proto.sh
touch ./motor/version.info
cat>./motor/version.info<<EOF
motor_version : 1.0.0
vllm_version : 0.13.0
vllm_ascend_version : 0.13.0
EOF
echo "Building wheel package with pip wheel (PEP517)... (VERBOSE=${VERBOSE})"
# Use pep517 build interface to avoid legacy setup.py warning. if no network, need add "--no-build-isolation"
cmd=(python -m pip wheel . --no-deps --use-pep517 -w dist)
if [[ "${VERBOSE}" -eq 0 ]]; then
cmd+=(-q) # quiet output by default
fi
"${cmd[@]}"