From f3ba8ef20ebe94abe7b62d855cf720f82f74d980 Mon Sep 17 00:00:00 2001 From: Gerard Ryan Date: Tue, 7 Oct 2025 01:09:56 +0100 Subject: [PATCH] Use triton from pytorch in trustyai image JIRA: https://issues.redhat.com/browse/RHOAIENG-34086 Triton here is a dependency of torch, and is just being explicitly re-declared so that the index to pull it from can be customized. Although torch was being pulled from the PyTorch index, all of its dependencies are still defaulting to coming from PyPI (or whatever default index is used for a build). In the triton case, PyPI only has x86_64 wheels for this version, but the PyTorch index has both x86_64 and aarch64 wheels, matching the arches that are available for torch. Since it's a dependency of torch, I've also added same platform exclusion marker to omit for ppc64le. --- jupyter/trustyai/ubi9-python-3.12/pylock.toml | 20 ++++++++++++------- .../trustyai/ubi9-python-3.12/pyproject.toml | 14 +++++++++++++ 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/jupyter/trustyai/ubi9-python-3.12/pylock.toml b/jupyter/trustyai/ubi9-python-3.12/pylock.toml index da6d81fa9b..a8f336babd 100644 --- a/jupyter/trustyai/ubi9-python-3.12/pylock.toml +++ b/jupyter/trustyai/ubi9-python-3.12/pylock.toml @@ -4235,14 +4235,20 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/70/26/2591b48412bde75 [[packages]] name = "triton" version = "3.3.1" -marker = "platform_machine != 'ppc64le' and sys_platform == 'linux'" +marker = "platform_machine != 'ppc64le'" wheels = [ - { url = "https://files.pythonhosted.org/packages/8d/a9/549e51e9b1b2c9b854fd761a1d23df0ba2fbc60bd0c13b489ffa518cfcb7/triton-3.3.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", upload-time = 2025-05-29T23:39:36Z, size = 155600257, hashes = { sha256 = "b74db445b1c562844d3cfad6e9679c72e93fdfb1a90a24052b03bb5c49d1242e" } }, - { url = "https://files.pythonhosted.org/packages/21/2f/3e56ea7b58f80ff68899b1dbe810ff257c9d177d288c6b0f55bf2fe4eb50/triton-3.3.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", upload-time = 2025-05-29T23:39:44Z, size = 155689937, hashes = { sha256 = "b31e3aa26f8cb3cc5bf4e187bf737cbacf17311e1112b781d4a059353dfd731b" } }, - { url = "https://files.pythonhosted.org/packages/24/5f/950fb373bf9c01ad4eb5a8cd5eaf32cdf9e238c02f9293557a2129b9c4ac/triton-3.3.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", upload-time = 2025-05-29T23:39:51Z, size = 155669138, hashes = { sha256 = "9999e83aba21e1a78c1f36f21bce621b77bcaa530277a50484a7cb4a822f6e43" } }, - { url = "https://files.pythonhosted.org/packages/74/1f/dfb531f90a2d367d914adfee771babbd3f1a5b26c3f5fbc458dee21daa78/triton-3.3.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", upload-time = 2025-05-29T23:40:02Z, size = 155673035, hashes = { sha256 = "b89d846b5a4198317fec27a5d3a609ea96b6d557ff44b56c23176546023c4240" } }, - { url = "https://files.pythonhosted.org/packages/28/71/bd20ffcb7a64c753dc2463489a61bf69d531f308e390ad06390268c4ea04/triton-3.3.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", upload-time = 2025-05-29T23:40:10Z, size = 155735832, hashes = { sha256 = "a3198adb9d78b77818a5388bff89fa72ff36f9da0bc689db2f0a651a67ce6a42" } }, - { url = "https://files.pythonhosted.org/packages/6d/81/ac4d50af22f594c4cb7c84fd2ad5ba1e0c03e2a83fe3483ddd79edcd7ec7/triton-3.3.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", upload-time = 2025-05-29T23:40:18Z, size = 155596799, hashes = { sha256 = "f6139aeb04a146b0b8e0fbbd89ad1e65861c57cfed881f21d62d3cb94a36bab7" } }, + { url = "https://download.pytorch.org/whl/triton-3.3.1-cp310-cp310-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hashes = {} }, + { url = "https://download.pytorch.org/whl/triton-3.3.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hashes = {} }, + { url = "https://download.pytorch.org/whl/triton-3.3.1-cp311-cp311-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hashes = {} }, + { url = "https://download.pytorch.org/whl/triton-3.3.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hashes = {} }, + { url = "https://download.pytorch.org/whl/triton-3.3.1-cp312-cp312-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hashes = {} }, + { url = "https://download.pytorch.org/whl/triton-3.3.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hashes = {} }, + { url = "https://download.pytorch.org/whl/triton-3.3.1-cp313-cp313-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hashes = {} }, + { url = "https://download.pytorch.org/whl/triton-3.3.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hashes = {} }, + { url = "https://download.pytorch.org/whl/triton-3.3.1-cp313-cp313t-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hashes = {} }, + { url = "https://download.pytorch.org/whl/triton-3.3.1-cp313-cp313t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hashes = {} }, + { url = "https://download.pytorch.org/whl/triton-3.3.1-cp39-cp39-manylinux_2_27_aarch64.manylinux_2_28_aarch64.whl", hashes = {} }, + { url = "https://download.pytorch.org/whl/triton-3.3.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl", hashes = {} }, ] [[packages]] diff --git a/jupyter/trustyai/ubi9-python-3.12/pyproject.toml b/jupyter/trustyai/ubi9-python-3.12/pyproject.toml index 32d687d869..55412c68ac 100644 --- a/jupyter/trustyai/ubi9-python-3.12/pyproject.toml +++ b/jupyter/trustyai/ubi9-python-3.12/pyproject.toml @@ -7,6 +7,19 @@ dependencies = [ # PyTorch packages "torch==2.7.1+cu128; platform_machine != 'ppc64le'", + # Triton here is a dependency of torch, and is just being + # explicitly re-declared so that the index to pull it from can be + # customized. Although torch was being pulled from the PyTorch + # index, all of its dependencies are still defaulting to coming + # from PyPI (or whatever default index is used for a build). In + # the triton case, PyPI only has x86_64 wheels for this version, + # but the PyTorch index has both x86_64 and aarch64 wheels, + # matching the arches that are available for torch. + # + # Since it's a dependency of torch, I've also added same platform + # exclusion marker to omit for ppc64le. + "triton==3.3.1; platform_machine != 'ppc64le'", + # TrustyAI packages # More information available at: # - https://pypi.org/project/trustyai/ @@ -64,6 +77,7 @@ environments = [ [tool.uv.sources] torch = { index = "pytorch-cuda" } +triton = { index = "pytorch-cuda" } [[tool.uv.index]] name = "pytorch-cuda"