Skip to content

Commit 9223811

Browse files
committed
Rework TODOs for manylinux version, fix example for sudo and env vars.
1 parent 1809c03 commit 9223811

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

shortfin/README.md

+14-8
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,22 @@ pip install -v -e .
3333

3434
## Package Python Release Builds
3535

36-
```bash
37-
# Build shortfin.*.whl into the dist/ directory
38-
# e.g. `shortfin-0.9-cp312-cp312-linux_x86_64.whl`
39-
python3 -m pip wheel -v -w dist .
36+
* To build wheels for Linux using a manylinux Docker container:
4037

41-
# Install the built wheel.
42-
python3 -m pip install dist/*.whl
43-
```
38+
```bash
39+
sudo ./build_tools/build_linux_package.sh
40+
```
41+
42+
* To build a wheel for your host OS/arch manually:
43+
44+
```bash
45+
# Build shortfin.*.whl into the dist/ directory
46+
# e.g. `shortfin-0.9-cp312-cp312-linux_x86_64.whl`
47+
python3 -m pip wheel -v -w dist .
4448
45-
TODO: helper script to build under manylinux using Docker
49+
# Install the built wheel.
50+
python3 -m pip install dist/*.whl
51+
```
4652

4753
## Python Dev Builds
4854

shortfin/build_tools/build_linux_package.sh

+8-6
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
# sudo ./build_tools/build_linux_package.sh
1515
#
1616
# Build specific Python versions to custom directory:
17-
# OVERRIDE_PYTHON_VERSIONS="cp312-cp312 cp313-313" \
17+
# OVERRIDE_PYTHON_VERSIONS="cp312-cp312 cp313-cp313" \
1818
# OUTPUT_DIR="/tmp/wheelhouse" \
19-
# sudo ./build_tools/build_linux_package.sh
19+
# sudo -E ./build_tools/build_linux_package.sh
2020
#
2121
# Valid Python versions match a subdirectory under /opt/python in the docker
2222
# image. Typically:
@@ -35,10 +35,12 @@ REPO_ROOT="$(cd "$THIS_DIR"/../../ && pwd)"
3535
SCRIPT_NAME="$(basename $0)"
3636
ARCH="$(uname -m)"
3737

38-
# TODO: update to manylinux_2_28, 2014 is being used by torch-mlir
39-
# MANYLINUX_DOCKER_IMAGE="${MANYLINUX_DOCKER_IMAGE:-"ghcr.io/nod-ai/manylinux_x86_64:main@sha256:facedb71df670016e74e646d71e869e6fff70d4cdbaa6634d4d0a10d6e174399" }')}"
40-
MANYLINUX_DOCKER_IMAGE="${MANYLINUX_DOCKER_IMAGE:-quay.io/pypa/manylinux2014_${ARCH}@sha256:2ace4b4f06a726d270821cb4993caeed3aacdaa54801e9f13be8fbe96077f4dc}"
41-
PYTHON_VERSIONS="${OVERRIDE_PYTHON_VERSIONS:-cp312-cp312}"
38+
# TODO(#130): Update to manylinux_2_28, upstream or a fork
39+
# * upstream uses a version of gcc that has build warnings/errors
40+
# * https://github.com/nod-ai/base-docker-images is a bit out of date but can include a recent clang
41+
# MANYLINUX_DOCKER_IMAGE="${MANYLINUX_DOCKER_IMAGE:-quay.io/pypa/manylinux_2_28_${ARCH}:latest}"
42+
MANYLINUX_DOCKER_IMAGE="${MANYLINUX_DOCKER_IMAGE:-quay.io/pypa/manylinux2014_${ARCH}:latest}"
43+
PYTHON_VERSIONS="${OVERRIDE_PYTHON_VERSIONS:-cp312-cp312 cp313-cp313}"
4244
OUTPUT_DIR="${OUTPUT_DIR:-${THIS_DIR}/wheelhouse}"
4345

4446
function run_on_host() {

0 commit comments

Comments
 (0)