From 20a7260da9862f890a32347c16baef5921c18bb1 Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Wed, 7 Jan 2026 14:41:00 -0500 Subject: [PATCH 01/12] testing image build Signed-off-by: Niels Bantilan --- .github/workflows/publish.yml | 243 +++++++++++++++--------------- maint_tools/build_plugin_image.py | 32 ++-- 2 files changed, 138 insertions(+), 137 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 74d8aa237..b957d6e81 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,6 +1,9 @@ name: Publish on: + push: + branches: + - nielsb/plugin-images release: types: [published] pull_request: @@ -9,71 +12,71 @@ on: - 'maint_tools/build_default_image.py' jobs: - flyte-pypi: - name: PyPI package - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: "0" - - name: Set up Python - uses: actions/setup-python@v1 - with: - python-version: "3.13" - - name: Install uv - uses: astral-sh/setup-uv@v6 - id: setup-uv - - name: Install dependencies - run: | - uv venv - uv pip install build twine setuptools wheel - - name: Build and publish - run: | - uv run python -m build --wheel --installer uv - - name: Publish - if: ${{ github.event_name == 'release' }} - working-directory: ${{ matrix.workdir }} - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - uv run python -m twine upload --verbose dist/* - - name: Sleep until pypi is available - id: pypiwait - run: | - # from 'refs/tags/v1.2.3 get 1.2.3' and make sure it's not an empty string - VERSION=$(echo $GITHUB_REF | sed 's|refs/tags/v||') - if [ -z "$VERSION" ] - then - echo "No tagged version found, exiting" - exit 1 - fi - sleep 300 - LINK="https://pypi.org/project/flyte/${VERSION}/" - for i in {1..60}; do - result=$(curl -L -I -s -f ${LINK}) - if [ $? -eq 0 ]; then - echo "Found pypi for $LINK" - exit 0 - else - echo "Did not find - Retrying in 10 seconds..." - sleep 10 - fi - done - exit 1 - shell: bash + # flyte-pypi: + # name: PyPI package + # runs-on: ubuntu-latest + # steps: + # - uses: actions/checkout@v4 + # with: + # fetch-depth: "0" + # - name: Set up Python + # uses: actions/setup-python@v1 + # with: + # python-version: "3.13" + # - name: Install uv + # uses: astral-sh/setup-uv@v6 + # id: setup-uv + # - name: Install dependencies + # run: | + # uv venv + # uv pip install build twine setuptools wheel + # - name: Build and publish + # run: | + # uv run python -m build --wheel --installer uv + # - name: Publish + # if: ${{ github.event_name == 'release' }} + # working-directory: ${{ matrix.workdir }} + # env: + # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + # run: | + # uv run python -m twine upload --verbose dist/* + # - name: Sleep until pypi is available + # id: pypiwait + # run: | + # # from 'refs/tags/v1.2.3 get 1.2.3' and make sure it's not an empty string + # VERSION=$(echo $GITHUB_REF | sed 's|refs/tags/v||') + # if [ -z "$VERSION" ] + # then + # echo "No tagged version found, exiting" + # exit 1 + # fi + # sleep 300 + # LINK="https://pypi.org/project/flyte/${VERSION}/" + # for i in {1..60}; do + # result=$(curl -L -I -s -f ${LINK}) + # if [ $? -eq 0 ]; then + # echo "Found pypi for $LINK" + # exit 0 + # else + # echo "Did not find - Retrying in 10 seconds..." + # sleep 10 + # fi + # done + # exit 1 + # shell: bash plugin-pypi: name: PyPI package runs-on: ubuntu-latest strategy: matrix: workdir: - - "plugins/ray" - - "plugins/spark" - - "plugins/openai" - - "plugins/dask" - - "plugins/pytorch" - - "plugins/connectors" + # - "plugins/ray" + # - "plugins/spark" + # - "plugins/openai" + # - "plugins/dask" + # - "plugins/pytorch" + # - "plugins/connectors" - "plugins/sglang" - "plugins/vllm" include: @@ -101,14 +104,14 @@ jobs: working-directory: ${{ matrix.workdir }} run: | uv run --prerelease allow python -m build --wheel --installer uv - - name: Publish - if: ${{ github.event_name == 'release' }} - working-directory: ${{ matrix.workdir }} - env: - TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - run: | - uv run --prerelease allow python -m twine upload --verbose dist/* + # - name: Publish + # if: ${{ github.event_name == 'release' }} + # working-directory: ${{ matrix.workdir }} + # env: + # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + # run: | + # uv run --prerelease allow python -m twine upload --verbose dist/* - name: Build and push the plugin image if: ${{ contains(matrix, 'image-type') }} env: @@ -117,56 +120,56 @@ jobs: run: | uv run python maint_tools/build_plugin_image.py --type ${{ matrix.image-type }} - build-and-push-flyte-docker-images: - needs: flyte-pypi - name: Flyte image for Python ${{ matrix.python-version }} - runs-on: ubuntu-latest - strategy: - matrix: - python-version: - - "3.10" - - "3.11" - - "3.12" - - "3.13" - - "3.14" - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: "0" - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3 - - name: Login to GitHub Container Registry - uses: docker/login-action@v3 - with: - registry: ghcr.io/flyteorg - username: "${{ secrets.FLYTE_BOT_USERNAME }}" - password: "${{ secrets.FLYTE_BOT_PAT }}" - - name: Fetch the code - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: ./.github/actions/setup-python-env - with: - python-version: "${{ matrix.python-version }}" - - name: Install dependencies - run: | - uv venv - uv pip install build twine setuptools wheel - uv pip freeze - - name: Build wheel - run: | - make dist - - name: Build and push the flyte image - env: - FLYTE_DOCKER_BUILDER_CACHE_FROM: "type=gha" - FLYTE_DOCKER_BUILDER_CACHE_TO: "type=gha,mode=max" - run: | - uv run python maint_tools/build_default_image.py --type flyte - - name: Build and push the connector image - env: - FLYTE_DOCKER_BUILDER_CACHE_FROM: "type=gha" - FLYTE_DOCKER_BUILDER_CACHE_TO: "type=gha,mode=max" - run: | - uv run python maint_tools/build_default_image.py --type connector \ No newline at end of file + # build-and-push-flyte-docker-images: + # needs: flyte-pypi + # name: Flyte image for Python ${{ matrix.python-version }} + # runs-on: ubuntu-latest + # strategy: + # matrix: + # python-version: + # - "3.10" + # - "3.11" + # - "3.12" + # - "3.13" + # - "3.14" + # steps: + # - uses: actions/checkout@v4 + # with: + # fetch-depth: "0" + # - name: Set up QEMU + # uses: docker/setup-qemu-action@v3 + # - name: Set up Docker Buildx + # id: buildx + # uses: docker/setup-buildx-action@v3 + # - name: Login to GitHub Container Registry + # uses: docker/login-action@v3 + # with: + # registry: ghcr.io/flyteorg + # username: "${{ secrets.FLYTE_BOT_USERNAME }}" + # password: "${{ secrets.FLYTE_BOT_PAT }}" + # - name: Fetch the code + # uses: actions/checkout@v4 + # - name: Set up Python ${{ matrix.python-version }} + # uses: ./.github/actions/setup-python-env + # with: + # python-version: "${{ matrix.python-version }}" + # - name: Install dependencies + # run: | + # uv venv + # uv pip install build twine setuptools wheel + # uv pip freeze + # - name: Build wheel + # run: | + # make dist + # - name: Build and push the flyte image + # env: + # FLYTE_DOCKER_BUILDER_CACHE_FROM: "type=gha" + # FLYTE_DOCKER_BUILDER_CACHE_TO: "type=gha,mode=max" + # run: | + # uv run python maint_tools/build_default_image.py --type flyte + # - name: Build and push the connector image + # env: + # FLYTE_DOCKER_BUILDER_CACHE_FROM: "type=gha" + # FLYTE_DOCKER_BUILDER_CACHE_TO: "type=gha,mode=max" + # run: | + # uv run python maint_tools/build_default_image.py --type connector \ No newline at end of file diff --git a/maint_tools/build_plugin_image.py b/maint_tools/build_plugin_image.py index 84f4bfb61..3e4ccb828 100644 --- a/maint_tools/build_plugin_image.py +++ b/maint_tools/build_plugin_image.py @@ -5,58 +5,56 @@ from flyte.extend import ImageBuildEngine -async def build_flyte_vllm_image(registry: str | None = None, name: str | None = None, builder: str | None = "local"): +async def build_flyte_vllm_image(registry: str | None = None, builder: str | None = "local"): """ Build the SDK default Debian-based image, optionally overriding - the container registry and image name. + the container registry name. Args: registry: e.g. "ghcr.io/my-org" or "123456789012.dkr.ecr.us-west-2.amazonaws.com". - name: e.g. "my-flyte-image". builder: e.g. "local" or "remote". """ import flyteplugins.vllm - default_image = flyteplugins.vllm.DEFAULT_VLLM_IMAGE.clone(registry=registry, name=name) - await ImageBuildEngine.build(default_image, builder=builder) + default_image = flyteplugins.vllm.DEFAULT_VLLM_IMAGE.clone(registry=registry) + await ImageBuildEngine.build(default_image, builder=builder, dry_run=True) -async def build_flyte_sglang_image(registry: str | None = None, name: str | None = None, builder: str | None = "local"): +async def build_flyte_sglang_image(registry: str | None = None, builder: str | None = "local"): """ Build the SDK default Debian-based image, optionally overriding - the container registry and image name. + the container registry name. """ import flyteplugins.sglang - default_image = flyteplugins.sglang.DEFAULT_SGLANG_IMAGE.clone(registry=registry, name=name) - await ImageBuildEngine.build(default_image, builder=builder) + default_image = flyteplugins.sglang.DEFAULT_SGLANG_IMAGE.clone(registry=registry) + await ImageBuildEngine.build(default_image, builder=builder, dry_run=True) -async def build_all(registry: str | None = None, name: str | None = None, builder: str | None = "local"): +async def build_all(registry: str | None = None, builder: str | None = "local"): await asyncio.gather( - build_flyte_vllm_image(registry=registry, name=name, builder=builder), - build_flyte_sglang_image(registry=registry, name=name, builder=builder), + build_flyte_vllm_image(registry=registry, builder=builder), + build_flyte_sglang_image(registry=registry, builder=builder), ) if __name__ == "__main__": parser = argparse.ArgumentParser(description="Build the default Flyte image.") parser.add_argument("--registry", help="Docker registry to push to") - parser.add_argument("--name", help="Custom image name (without tag)") parser.add_argument("--type", choices=["vllm", "sglang", "all"], help="Type of image to build") parser.add_argument("--builder", choices=["local", "remote"], default="local", help="Image builder to use") args = parser.parse_args() # can remove this and only specify one in the future - assert (args.registry and args.name) or (not args.registry and not args.name) + assert args.registry flyte.init_from_config() if args.type == "vllm": print("Building vllm image...") - asyncio.run(build_flyte_vllm_image(registry=args.registry, name=args.name, builder=args.builder)) + asyncio.run(build_flyte_vllm_image(registry=args.registry, builder=args.builder)) elif args.type == "sglang": print("Building sglang image...") - asyncio.run(build_flyte_sglang_image(registry=args.registry, name=args.name, builder=args.builder)) + asyncio.run(build_flyte_sglang_image(registry=args.registry, builder=args.builder)) else: print("Building all images...") - asyncio.run(build_all(registry=args.registry, name=args.name, builder=args.builder)) + asyncio.run(build_all(registry=args.registry, builder=args.builder)) From 75b16f71fcd741280fa09d8c65cb82e6d32d0119 Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Wed, 7 Jan 2026 14:42:46 -0500 Subject: [PATCH 02/12] testing Signed-off-by: Niels Bantilan --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b957d6e81..4c1781c3a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -113,7 +113,7 @@ jobs: # run: | # uv run --prerelease allow python -m twine upload --verbose dist/* - name: Build and push the plugin image - if: ${{ contains(matrix, 'image-type') }} + if: ${{ matrix.image-type }} env: FLYTE_DOCKER_BUILDER_CACHE_FROM: "type=gha" FLYTE_DOCKER_BUILDER_CACHE_TO: "type=gha,mode=max" From 9ee62a94d7342fb61ac896bc8e3312c86db43bad Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Wed, 7 Jan 2026 14:44:16 -0500 Subject: [PATCH 03/12] testing Signed-off-by: Niels Bantilan --- .github/workflows/publish.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4c1781c3a..63c02be14 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -92,6 +92,17 @@ jobs: uses: actions/setup-python@v1 with: python-version: "3.13" + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io/flyteorg + username: "${{ secrets.FLYTE_BOT_USERNAME }}" + password: "${{ secrets.FLYTE_BOT_PAT }}" - name: Install uv uses: astral-sh/setup-uv@v6 id: setup-uv From 02b17aa97ae26c03696969897e31693812106bf5 Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Wed, 7 Jan 2026 14:48:32 -0500 Subject: [PATCH 04/12] testing Signed-off-by: Niels Bantilan --- maint_tools/build_plugin_image.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/maint_tools/build_plugin_image.py b/maint_tools/build_plugin_image.py index 3e4ccb828..832c6ad0a 100644 --- a/maint_tools/build_plugin_image.py +++ b/maint_tools/build_plugin_image.py @@ -45,8 +45,6 @@ async def build_all(registry: str | None = None, builder: str | None = "local"): parser.add_argument("--builder", choices=["local", "remote"], default="local", help="Image builder to use") args = parser.parse_args() - # can remove this and only specify one in the future - assert args.registry flyte.init_from_config() if args.type == "vllm": From 9e6729f74d95959fef39ad744fba313698cc1f31 Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Wed, 7 Jan 2026 14:50:21 -0500 Subject: [PATCH 05/12] update Signed-off-by: Niels Bantilan --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 63c02be14..f5f5cdede 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -111,6 +111,7 @@ jobs: run: | uv venv uv pip install build twine setuptools wheel + uv pip install . - name: Build and publish working-directory: ${{ matrix.workdir }} run: | From 02ff1c2ae3122b82dbf07bab655340c9acc46bba Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Wed, 7 Jan 2026 14:54:31 -0500 Subject: [PATCH 06/12] testing Signed-off-by: Niels Bantilan --- .github/workflows/publish.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f5f5cdede..a2100873f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -111,7 +111,6 @@ jobs: run: | uv venv uv pip install build twine setuptools wheel - uv pip install . - name: Build and publish working-directory: ${{ matrix.workdir }} run: | @@ -130,7 +129,7 @@ jobs: FLYTE_DOCKER_BUILDER_CACHE_FROM: "type=gha" FLYTE_DOCKER_BUILDER_CACHE_TO: "type=gha,mode=max" run: | - uv run python maint_tools/build_plugin_image.py --type ${{ matrix.image-type }} + uv run python maint_tools/build_plugin_image.py --with ${{ matrix.workdir }} --type ${{ matrix.image-type }} # build-and-push-flyte-docker-images: # needs: flyte-pypi From d6e27cc8d5fde91ce2533f13163baa339460207f Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Wed, 7 Jan 2026 14:55:49 -0500 Subject: [PATCH 07/12] testing Signed-off-by: Niels Bantilan --- .github/workflows/publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a2100873f..a609e5ada 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -129,7 +129,7 @@ jobs: FLYTE_DOCKER_BUILDER_CACHE_FROM: "type=gha" FLYTE_DOCKER_BUILDER_CACHE_TO: "type=gha,mode=max" run: | - uv run python maint_tools/build_plugin_image.py --with ${{ matrix.workdir }} --type ${{ matrix.image-type }} + uv run --with ${{ matrix.workdir }} python maint_tools/build_plugin_image.py --type ${{ matrix.image-type }} # build-and-push-flyte-docker-images: # needs: flyte-pypi From 62e29c5adfb572a58b633b48906e1ab18dad2d5e Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Wed, 7 Jan 2026 15:02:12 -0500 Subject: [PATCH 08/12] finalize update Signed-off-by: Niels Bantilan --- .github/workflows/publish.yml | 243 +++++++++++++++--------------- maint_tools/build_plugin_image.py | 24 +-- 2 files changed, 128 insertions(+), 139 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a609e5ada..c5519f238 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,9 +1,6 @@ name: Publish on: - push: - branches: - - nielsb/plugin-images release: types: [published] pull_request: @@ -12,71 +9,71 @@ on: - 'maint_tools/build_default_image.py' jobs: - # flyte-pypi: - # name: PyPI package - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # with: - # fetch-depth: "0" - # - name: Set up Python - # uses: actions/setup-python@v1 - # with: - # python-version: "3.13" - # - name: Install uv - # uses: astral-sh/setup-uv@v6 - # id: setup-uv - # - name: Install dependencies - # run: | - # uv venv - # uv pip install build twine setuptools wheel - # - name: Build and publish - # run: | - # uv run python -m build --wheel --installer uv - # - name: Publish - # if: ${{ github.event_name == 'release' }} - # working-directory: ${{ matrix.workdir }} - # env: - # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - # run: | - # uv run python -m twine upload --verbose dist/* - # - name: Sleep until pypi is available - # id: pypiwait - # run: | - # # from 'refs/tags/v1.2.3 get 1.2.3' and make sure it's not an empty string - # VERSION=$(echo $GITHUB_REF | sed 's|refs/tags/v||') - # if [ -z "$VERSION" ] - # then - # echo "No tagged version found, exiting" - # exit 1 - # fi - # sleep 300 - # LINK="https://pypi.org/project/flyte/${VERSION}/" - # for i in {1..60}; do - # result=$(curl -L -I -s -f ${LINK}) - # if [ $? -eq 0 ]; then - # echo "Found pypi for $LINK" - # exit 0 - # else - # echo "Did not find - Retrying in 10 seconds..." - # sleep 10 - # fi - # done - # exit 1 - # shell: bash + flyte-pypi: + name: PyPI package + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: "0" + - name: Set up Python + uses: actions/setup-python@v1 + with: + python-version: "3.13" + - name: Install uv + uses: astral-sh/setup-uv@v6 + id: setup-uv + - name: Install dependencies + run: | + uv venv + uv pip install build twine setuptools wheel + - name: Build and publish + run: | + uv run python -m build --wheel --installer uv + - name: Publish + if: ${{ github.event_name == 'release' }} + working-directory: ${{ matrix.workdir }} + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + uv run python -m twine upload --verbose dist/* + - name: Sleep until pypi is available + id: pypiwait + run: | + # from 'refs/tags/v1.2.3 get 1.2.3' and make sure it's not an empty string + VERSION=$(echo $GITHUB_REF | sed 's|refs/tags/v||') + if [ -z "$VERSION" ] + then + echo "No tagged version found, exiting" + exit 1 + fi + sleep 300 + LINK="https://pypi.org/project/flyte/${VERSION}/" + for i in {1..60}; do + result=$(curl -L -I -s -f ${LINK}) + if [ $? -eq 0 ]; then + echo "Found pypi for $LINK" + exit 0 + else + echo "Did not find - Retrying in 10 seconds..." + sleep 10 + fi + done + exit 1 + shell: bash plugin-pypi: name: PyPI package runs-on: ubuntu-latest strategy: matrix: workdir: - # - "plugins/ray" - # - "plugins/spark" - # - "plugins/openai" - # - "plugins/dask" - # - "plugins/pytorch" - # - "plugins/connectors" + - "plugins/ray" + - "plugins/spark" + - "plugins/openai" + - "plugins/dask" + - "plugins/pytorch" + - "plugins/connectors" - "plugins/sglang" - "plugins/vllm" include: @@ -115,14 +112,14 @@ jobs: working-directory: ${{ matrix.workdir }} run: | uv run --prerelease allow python -m build --wheel --installer uv - # - name: Publish - # if: ${{ github.event_name == 'release' }} - # working-directory: ${{ matrix.workdir }} - # env: - # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - # run: | - # uv run --prerelease allow python -m twine upload --verbose dist/* + - name: Publish + if: ${{ github.event_name == 'release' }} + working-directory: ${{ matrix.workdir }} + env: + TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + run: | + uv run --prerelease allow python -m twine upload --verbose dist/* - name: Build and push the plugin image if: ${{ matrix.image-type }} env: @@ -131,56 +128,56 @@ jobs: run: | uv run --with ${{ matrix.workdir }} python maint_tools/build_plugin_image.py --type ${{ matrix.image-type }} - # build-and-push-flyte-docker-images: - # needs: flyte-pypi - # name: Flyte image for Python ${{ matrix.python-version }} - # runs-on: ubuntu-latest - # strategy: - # matrix: - # python-version: - # - "3.10" - # - "3.11" - # - "3.12" - # - "3.13" - # - "3.14" - # steps: - # - uses: actions/checkout@v4 - # with: - # fetch-depth: "0" - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v3 - # - name: Set up Docker Buildx - # id: buildx - # uses: docker/setup-buildx-action@v3 - # - name: Login to GitHub Container Registry - # uses: docker/login-action@v3 - # with: - # registry: ghcr.io/flyteorg - # username: "${{ secrets.FLYTE_BOT_USERNAME }}" - # password: "${{ secrets.FLYTE_BOT_PAT }}" - # - name: Fetch the code - # uses: actions/checkout@v4 - # - name: Set up Python ${{ matrix.python-version }} - # uses: ./.github/actions/setup-python-env - # with: - # python-version: "${{ matrix.python-version }}" - # - name: Install dependencies - # run: | - # uv venv - # uv pip install build twine setuptools wheel - # uv pip freeze - # - name: Build wheel - # run: | - # make dist - # - name: Build and push the flyte image - # env: - # FLYTE_DOCKER_BUILDER_CACHE_FROM: "type=gha" - # FLYTE_DOCKER_BUILDER_CACHE_TO: "type=gha,mode=max" - # run: | - # uv run python maint_tools/build_default_image.py --type flyte - # - name: Build and push the connector image - # env: - # FLYTE_DOCKER_BUILDER_CACHE_FROM: "type=gha" - # FLYTE_DOCKER_BUILDER_CACHE_TO: "type=gha,mode=max" - # run: | - # uv run python maint_tools/build_default_image.py --type connector \ No newline at end of file + build-and-push-flyte-docker-images: + needs: flyte-pypi + name: Flyte image for Python ${{ matrix.python-version }} + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - "3.10" + - "3.11" + - "3.12" + - "3.13" + - "3.14" + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: "0" + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io/flyteorg + username: "${{ secrets.FLYTE_BOT_USERNAME }}" + password: "${{ secrets.FLYTE_BOT_PAT }}" + - name: Fetch the code + uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: ./.github/actions/setup-python-env + with: + python-version: "${{ matrix.python-version }}" + - name: Install dependencies + run: | + uv venv + uv pip install build twine setuptools wheel + uv pip freeze + - name: Build wheel + run: | + make dist + - name: Build and push the flyte image + env: + FLYTE_DOCKER_BUILDER_CACHE_FROM: "type=gha" + FLYTE_DOCKER_BUILDER_CACHE_TO: "type=gha,mode=max" + run: | + uv run python maint_tools/build_default_image.py --type flyte + - name: Build and push the connector image + env: + FLYTE_DOCKER_BUILDER_CACHE_FROM: "type=gha" + FLYTE_DOCKER_BUILDER_CACHE_TO: "type=gha,mode=max" + run: | + uv run python maint_tools/build_default_image.py --type connector \ No newline at end of file diff --git a/maint_tools/build_plugin_image.py b/maint_tools/build_plugin_image.py index 832c6ad0a..56eeb93d3 100644 --- a/maint_tools/build_plugin_image.py +++ b/maint_tools/build_plugin_image.py @@ -5,7 +5,7 @@ from flyte.extend import ImageBuildEngine -async def build_flyte_vllm_image(registry: str | None = None, builder: str | None = "local"): +async def build_flyte_vllm_image(registry: str | None = None, name: str | None = None, builder: str | None = "local"): """ Build the SDK default Debian-based image, optionally overriding the container registry name. @@ -16,32 +16,25 @@ async def build_flyte_vllm_image(registry: str | None = None, builder: str | Non """ import flyteplugins.vllm - default_image = flyteplugins.vllm.DEFAULT_VLLM_IMAGE.clone(registry=registry) - await ImageBuildEngine.build(default_image, builder=builder, dry_run=True) + default_image = flyteplugins.vllm.DEFAULT_VLLM_IMAGE.clone(registry=registry, name=name) + await ImageBuildEngine.build(default_image, builder=builder) -async def build_flyte_sglang_image(registry: str | None = None, builder: str | None = "local"): +async def build_flyte_sglang_image(registry: str | None = None, name: str | None = None, builder: str | None = "local"): """ Build the SDK default Debian-based image, optionally overriding the container registry name. """ import flyteplugins.sglang - default_image = flyteplugins.sglang.DEFAULT_SGLANG_IMAGE.clone(registry=registry) - await ImageBuildEngine.build(default_image, builder=builder, dry_run=True) - - -async def build_all(registry: str | None = None, builder: str | None = "local"): - await asyncio.gather( - build_flyte_vllm_image(registry=registry, builder=builder), - build_flyte_sglang_image(registry=registry, builder=builder), - ) + default_image = flyteplugins.sglang.DEFAULT_SGLANG_IMAGE.clone(registry=registry, name=name) + await ImageBuildEngine.build(default_image, builder=builder) if __name__ == "__main__": parser = argparse.ArgumentParser(description="Build the default Flyte image.") parser.add_argument("--registry", help="Docker registry to push to") - parser.add_argument("--type", choices=["vllm", "sglang", "all"], help="Type of image to build") + parser.add_argument("--type", choices=["vllm", "sglang"], help="Type of image to build") parser.add_argument("--builder", choices=["local", "remote"], default="local", help="Image builder to use") args = parser.parse_args() @@ -54,5 +47,4 @@ async def build_all(registry: str | None = None, builder: str | None = "local"): print("Building sglang image...") asyncio.run(build_flyte_sglang_image(registry=args.registry, builder=args.builder)) else: - print("Building all images...") - asyncio.run(build_all(registry=args.registry, builder=args.builder)) + raise ValueError(f"Invalid type: {args.type}. Valid types are: [vllm, sglang].") From 08d1e9fb8df2fa43a15dc2f71a5e24b8a01c2780 Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Wed, 7 Jan 2026 15:04:59 -0500 Subject: [PATCH 09/12] update Signed-off-by: Niels Bantilan --- plugins/sglang/src/flyteplugins/sglang/_app_environment.py | 2 +- plugins/vllm/src/flyteplugins/vllm/_app_environment.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/sglang/src/flyteplugins/sglang/_app_environment.py b/plugins/sglang/src/flyteplugins/sglang/_app_environment.py index abe8facf1..a128b3369 100644 --- a/plugins/sglang/src/flyteplugins/sglang/_app_environment.py +++ b/plugins/sglang/src/flyteplugins/sglang/_app_environment.py @@ -14,7 +14,7 @@ from flyteplugins.sglang._constants import SGLANG_MIN_VERSION_STR DEFAULT_SGLANG_IMAGE = ( - flyte.Image.from_debian_base(name="sglang-app-image") + flyte.Image.from_debian_base(name="sglang-app-image", python_version=(3, 13)) # install system dependencies, including CUDA toolkit, which is needed by sglang for compiling the model # and rust and cargo for installing sglang .with_apt_packages("libnuma-dev", "wget", "curl", "openssl", "pkg-config", "libssl-dev", "build-essential") diff --git a/plugins/vllm/src/flyteplugins/vllm/_app_environment.py b/plugins/vllm/src/flyteplugins/vllm/_app_environment.py index 3394a6ffe..06f659dd8 100644 --- a/plugins/vllm/src/flyteplugins/vllm/_app_environment.py +++ b/plugins/vllm/src/flyteplugins/vllm/_app_environment.py @@ -14,7 +14,7 @@ from flyteplugins.vllm._constants import VLLM_MIN_VERSION_STR DEFAULT_VLLM_IMAGE = ( - flyte.Image.from_debian_base(name="vllm-app-image") + flyte.Image.from_debian_base(name="vllm-app-image", python_version=(3, 13)) # install flashinfer and vllm .with_pip_packages("flashinfer-python", "flashinfer-cubin") .with_pip_packages("flashinfer-jit-cache", index_url="https://flashinfer.ai/whl/cu129") From 48a1e8717dba1a827113b9fab6534f1bb8adfb69 Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Wed, 7 Jan 2026 15:16:22 -0500 Subject: [PATCH 10/12] update ci Signed-off-by: Niels Bantilan --- .github/workflows/publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c5519f238..dc7e379be 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,6 +7,7 @@ on: paths: - '.github/workflows/publish.yml' - 'maint_tools/build_default_image.py' + - 'maint_tools/build_plugin_image.py' jobs: flyte-pypi: @@ -108,7 +109,7 @@ jobs: run: | uv venv uv pip install build twine setuptools wheel - - name: Build and publish + - name: Build working-directory: ${{ matrix.workdir }} run: | uv run --prerelease allow python -m build --wheel --installer uv From 66e1b291360d80feb6036a734a86f77765c63b6d Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Wed, 7 Jan 2026 15:23:32 -0500 Subject: [PATCH 11/12] use remote image builder Signed-off-by: Niels Bantilan --- maint_tools/build_plugin_image.py | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/maint_tools/build_plugin_image.py b/maint_tools/build_plugin_image.py index 56eeb93d3..ded887a32 100644 --- a/maint_tools/build_plugin_image.py +++ b/maint_tools/build_plugin_image.py @@ -32,6 +32,8 @@ async def build_flyte_sglang_image(registry: str | None = None, name: str | None if __name__ == "__main__": + import os + parser = argparse.ArgumentParser(description="Build the default Flyte image.") parser.add_argument("--registry", help="Docker registry to push to") parser.add_argument("--type", choices=["vllm", "sglang"], help="Type of image to build") @@ -39,12 +41,27 @@ async def build_flyte_sglang_image(registry: str | None = None, name: str | None args = parser.parse_args() - flyte.init_from_config() + if os.getenv("GITHUB_ACTIONS", "") == "true": + flyte.init( + endpoint=os.getenv("FLYTE_ENDPOINT", "dns:///playground.canary.unionai.cloud"), + auth_type="ClientSecret", + client_id="flyte-sdk-ci", + client_credentials_secret=os.getenv("FLYTE_SDK_CI_TOKEN"), + insecure=False, + image_builder="remote", + project=os.getenv("FLYTE_PROJECT", "flyte-sdk"), + domain=os.getenv("FLYTE_DOMAIN", "development"), + ) + builder = "remote" + else: + flyte.init_from_config() + builder = args.builder + if args.type == "vllm": print("Building vllm image...") - asyncio.run(build_flyte_vllm_image(registry=args.registry, builder=args.builder)) + asyncio.run(build_flyte_vllm_image(registry=args.registry, builder=builder)) elif args.type == "sglang": print("Building sglang image...") - asyncio.run(build_flyte_sglang_image(registry=args.registry, builder=args.builder)) + asyncio.run(build_flyte_sglang_image(registry=args.registry, builder=builder)) else: raise ValueError(f"Invalid type: {args.type}. Valid types are: [vllm, sglang].") From 169a8bc64b7a4de3398960508c94d250adf21540 Mon Sep 17 00:00:00 2001 From: Niels Bantilan Date: Wed, 7 Jan 2026 15:25:01 -0500 Subject: [PATCH 12/12] add flyte ci token Signed-off-by: Niels Bantilan --- .github/workflows/publish.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index dc7e379be..3b8d23cf4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -124,6 +124,7 @@ jobs: - name: Build and push the plugin image if: ${{ matrix.image-type }} env: + FLYTE_SDK_CI_TOKEN: "${{ secrets.FLYTE_SDK_CI_TOKEN }}" FLYTE_DOCKER_BUILDER_CACHE_FROM: "type=gha" FLYTE_DOCKER_BUILDER_CACHE_TO: "type=gha,mode=max" run: |