mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-04-24 00:12:08 +00:00
fix: limit build and tweak post build commands
This commit is contained in:
parent
816e14f0b3
commit
f4e7cdb04a
26
.github/workflows/python-packaging.yaml
vendored
26
.github/workflows/python-packaging.yaml
vendored
@ -6,7 +6,7 @@ on:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- '*'
|
||||
- "*"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
@ -21,14 +21,26 @@ jobs:
|
||||
# Using ubuntu-20.04 instead of 22.04 for more compatibility (glibc). Ideally we'd use the
|
||||
# manylinux docker image, but I haven't figured out how to install CUDA on manylinux.
|
||||
os: [ubuntu-20.04]
|
||||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
|
||||
torch-version: ["1.12.1", "1.13.1", "2.0.1", "2.1.2", "2.2.2", "2.3.0"]
|
||||
cuda-version: ["11.8.0", "12.2.2"]
|
||||
python-version: [
|
||||
# "3.7", "3.8", "3.9", "3.10",
|
||||
"3.11",
|
||||
]
|
||||
torch-version: [
|
||||
# "1.12.1", "1.13.1", "2.0.1", "2.1.2", "2.2.2",
|
||||
"2.3.0",
|
||||
]
|
||||
cuda-version: [
|
||||
# "11.8.0",
|
||||
"12.2.2",
|
||||
]
|
||||
# We need separate wheels that either uses C++11 ABI (-D_GLIBCXX_USE_CXX11_ABI) or not.
|
||||
# Pytorch wheels currently don't use it, but nvcr images have Pytorch compiled with C++11 ABI.
|
||||
# Without this we get import error (undefined symbol: _ZN3c105ErrorC2ENS_14SourceLocationESs)
|
||||
# when building without C++11 ABI and using it on nvcr images.
|
||||
cxx11_abi: ["FALSE", "TRUE"]
|
||||
cxx11_abi: [
|
||||
# "FALSE",
|
||||
"TRUE",
|
||||
]
|
||||
exclude:
|
||||
# see https://github.com/pytorch/pytorch/blob/main/RELEASE.md#release-compatibility-matrix
|
||||
# Pytorch <= 1.12 does not support Python 3.11
|
||||
@ -144,9 +156,9 @@ jobs:
|
||||
MAX_JOBS=2 FLASH_ATTENTION_FORCE_BUILD="TRUE" FLASH_ATTENTION_FORCE_CXX11_ABI=${{ matrix.cxx11_abi }} python setup.py bdist_wheel --dist-dir=dist
|
||||
# Generate a custom name for the wheel to include CUDA and Torch versions
|
||||
tmpname=cu${MATRIX_CUDA_VERSION}torch${MATRIX_TORCH_VERSION}cxx11abi${{ matrix.cxx11_abi }}
|
||||
wheel_name=$(ls dist/*.whl | xargs -n 1 basename | sed "s/-/+$tmpname-/2")
|
||||
wheel_name=$(ls dist/*whl | xargs -n 1 basename | sed "s/-/+$tmpname-/2")
|
||||
# Rename the wheel with the custom name
|
||||
ls dist/*.whl | xargs -I {} mv {} dist/${wheel_name}
|
||||
ls dist/*whl |xargs -I {} mv {} dist/${wheel_name}
|
||||
# Save the wheel name to the GitHub environment
|
||||
echo "wheel_name=${wheel_name}" >> $GITHUB_ENV
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user