Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 62 additions & 7 deletions .github/workflows/aiter-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,68 @@ jobs:
${{ env.BUILD_DOCKER_IMAGE }} \
sleep infinity

- name: Install Dependencies (legacy rocm/pytorch image)
- name: Resolve container Python (legacy)
if: ${{ matrix.build_enabled && env.USE_MANYLINUX != 'true' }}
run: |
set -euo pipefail
PYTHON_BIN=$(docker exec \
-w /workspace \
aiter_build_${{ matrix.python_version }} \
sh -lc '
for candidate in /opt/venv/bin/python python3 python; do
if [ -x "$candidate" ]; then
py="$candidate"
elif command -v "$candidate" >/dev/null 2>&1; then
py="$(command -v "$candidate")"
else
continue
fi
Comment on lines +232 to +239
if "$py" -m pip --version >/dev/null 2>&1; then
echo "$py"
exit 0
fi
done
echo "No python with pip found in container" >&2
exit 1
')
echo "CONTAINER_PYTHON=${PYTHON_BIN}" >> "$GITHUB_ENV"
echo "Using container Python: ${PYTHON_BIN}"
docker exec \
-w /workspace \
aiter_build_${{ matrix.python_version }} \
"${PYTHON_BIN}" --version
docker exec \
-w /workspace \
aiter_build_${{ matrix.python_version }} \
"${PYTHON_BIN}" -m pip --version
PIP_INSTALL_FLAGS=""
if docker exec \
-w /workspace \
aiter_build_${{ matrix.python_version }} \
"${PYTHON_BIN}" -c 'import sysconfig; from pathlib import Path; raise SystemExit(0 if (Path(sysconfig.get_path("stdlib")) / "EXTERNALLY-MANAGED").exists() else 1)'; then
PIP_INSTALL_FLAGS="--break-system-packages"
echo "Detected externally managed Python environment; using ${PIP_INSTALL_FLAGS}"
fi
echo "PIP_INSTALL_FLAGS=${PIP_INSTALL_FLAGS}" >> "$GITHUB_ENV"

- name: Remove preinstalled Aiter packages (legacy)
if: ${{ matrix.build_enabled && env.USE_MANYLINUX != 'true' }}
run: |
set -e
docker exec \
-w /workspace \
aiter_build_${{ matrix.python_version }} \
"${CONTAINER_PYTHON}" -m pip uninstall ${PIP_INSTALL_FLAGS} -y amd-aiter aiter || true

- name: Install Dependencies (legacy container)
if: ${{ matrix.build_enabled && env.USE_MANYLINUX != 'true' }}
run: |
set -e
echo "Install Dependencies"
docker exec \
-w /workspace \
aiter_build_${{ matrix.python_version }} \
pip install --timeout=60 --retries=10 -r requirements.txt
"${CONTAINER_PYTHON}" -m pip install ${PIP_INSTALL_FLAGS} --timeout=60 --retries=10 -r requirements.txt

- name: Pin setuptools_scm (legacy)
if: ${{ matrix.build_enabled && env.USE_MANYLINUX != 'true' }}
Expand All @@ -238,7 +291,7 @@ jobs:
docker exec \
-w /workspace \
aiter_build_${{ matrix.python_version }} \
pip install --timeout=60 --retries=10 "setuptools_scm<10"
"${CONTAINER_PYTHON}" -m pip install ${PIP_INSTALL_FLAGS} --timeout=60 --retries=10 "setuptools_scm<10"

- name: Install ninja (legacy)
if: ${{ matrix.build_enabled && env.USE_MANYLINUX != 'true' }}
Expand All @@ -248,7 +301,7 @@ jobs:
docker exec \
-w /workspace \
aiter_build_${{ matrix.python_version }} \
pip install --timeout=60 --retries=10 ninja
"${CONTAINER_PYTHON}" -m pip install ${PIP_INSTALL_FLAGS} --timeout=60 --retries=10 ninja

- name: Pin setuptools-scm (legacy)
if: ${{ matrix.build_enabled && env.USE_MANYLINUX != 'true' }}
Expand All @@ -257,7 +310,7 @@ jobs:
docker exec \
-w /workspace \
aiter_build_${{ matrix.python_version }} \
pip install --timeout=60 --retries=10 'setuptools-scm<10'
"${CONTAINER_PYTHON}" -m pip install ${PIP_INSTALL_FLAGS} --timeout=60 --retries=10 'setuptools-scm<10'

- name: Build Aiter (legacy)
if: ${{ matrix.build_enabled && env.USE_MANYLINUX != 'true' }}
Expand All @@ -271,16 +324,18 @@ jobs:
-e SETUPTOOLS_SCM_PRETEND_VERSION="${{ steps.version.outputs.nightly_version }}" \
-e PREBUILD_KERNELS=1 \
-e GPU_ARCHS="${{ env.GPU_ARCHS }}" \
-e CONTAINER_PYTHON="${CONTAINER_PYTHON}" \
-w /workspace \
aiter_build_${{ matrix.python_version }} \
bash -c "python3 setup.py bdist_wheel && ls dist/*.whl"
sh -lc '"${CONTAINER_PYTHON}" setup.py bdist_wheel && ls dist/*.whl'
else
docker exec \
-e PREBUILD_KERNELS=1 \
-e GPU_ARCHS="${{ env.GPU_ARCHS }}" \
-e CONTAINER_PYTHON="${CONTAINER_PYTHON}" \
-w /workspace \
aiter_build_${{ matrix.python_version }} \
bash -c "python3 setup.py bdist_wheel && ls dist/*.whl"
sh -lc '"${CONTAINER_PYTHON}" setup.py bdist_wheel && ls dist/*.whl'
fi

# ============================================================
Expand Down
Loading