forked from nod-ai/shark-ai
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_linux_package.sh
executable file
·31 lines (25 loc) · 1003 Bytes
/
build_linux_package.sh
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
#!/bin/bash
# Copyright 2024 Advanced Micro Devices, Inc.
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# build_linux_package.sh
#
# Builds sharktank Python package for Linux.
#
# Note: requires a modern Python (3.12+ seems to work). Troubleshooting help:
# * https://stackoverflow.com/a/77284076
# * https://stackoverflow.com/a/77364602
# Older versions like 3.10 don't include the package name and set as UNKNOWN?
# * Might just need some local packages updated?
#
# Usage:
# ./build_tools/build_linux_package.sh
set -xeu -o errtrace
THIS_DIR="$(cd $(dirname $0) && pwd)"
REPO_ROOT="$(cd "$THIS_DIR"/../../ && pwd)"
OUTPUT_DIR="${OUTPUT_DIR:-${THIS_DIR}/wheelhouse}"
python -m pip wheel --disable-pip-version-check --no-deps -v -w "${OUTPUT_DIR}" "${REPO_ROOT}/sharktank"
wheel_output="$(echo "${OUTPUT_DIR}/sharktank-"*".whl")"
ls "${wheel_output}"