Skip to content

Add 'make devbox-run APPLE_SILICON=1' for development - #8275

Open
0yukali0 wants to merge 7 commits into
flyteorg:mainfrom
0yukali0:flyte-8274
Open

0yukali0 wants to merge 7 commits into
flyteorg:mainfrom
0yukali0:flyte-8274

Conversation

@0yukali0

@0yukali0 0yukali0 commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Tracking issue

Close #8274

Why are the changes needed?

  1. Consistency. make devbox-build and make devbox-run do not support an Apple Silicon
    development environment on a Mac, while flyte-sdk does (flyte start devbox --apple-silicon).
  2. Simple Mac development environment. Update the Makefile so developers can set up the
    development environment with make commands, instead of switching between make and the flyte-sdk CLI.
    This gives a simple way to build a development environment on a Mac.

What changes were proposed in this pull request?

  1. Add mlx-start and mlx-stop to trigger the mlx bridge.
  2. Provide APPLE_SILICON option in devbox-run
  3. Provide APPLE_SILICON option in make run / make run-dev so tasks reach S3 and the manager from both the pod and the Mac.

How was this patch tested?

  1. run the command in the setup process to build the environment
  2. uv run an apple example in flyte-sdk/accelerator

Labels

  • added: For new features.

This is important to improve the readability of release notes.

Setup process

Two option

  1. complete devbox: helm + kustomize deployment
make devbox-build
make devbox-run APPLE_SILICON=True
flyte create config --devbox
  1. local flyte + devbox which disable flyte-binary
make devbox-build 
make devbox-run FLYTE_DEV=True APPLE_SILICON=True
make run APPLE_SILICON=True
flyte create config --devbox

Screenshots

After setup process done, run the apple example in the flyte-sdk.

uv run apple_silicon_train.py # which is the apple silicon example in the flyte-sdk/accelerator
  1. with local manager
Screenshot 2026-10-31 at 6 32 17 PM
  1. devbox with apple silicon
Screenshot 2026-10-31 at 6 26 13 PM

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Stack

Docs link

Signed-off-by: Yuteng Chen <a08h0283@gmail.com>
Signed-off-by: Yuteng Chen <a08h0283@gmail.com>
@0yukali0
0yukali0 marked this pull request as ready for review October 30, 2026 23:36
Signed-off-by: Yuteng Chen <a08h0283@gmail.com>
…ng position

Signed-off-by: Yuteng Chen <a08h0283@gmail.com>
Signed-off-by: Yuteng Chen <a08h0283@gmail.com>
…command

Signed-off-by: Yuteng Chen <a08h0283@gmail.com>
@0yukali0
0yukali0 marked this pull request as draft October 31, 2026 08:30
…flyte from the mac

Signed-off-by: Yuteng Chen <a08h0283@gmail.com>
@0yukali0
0yukali0 marked this pull request as ready for review October 31, 2026 10:36
@allpurposepunk

Copy link
Copy Markdown

👀

Comment thread CONTRIBUTING.md
`FLYTE_DEV=True` is required when you intend to run the manager locally — it disables the in-cluster manager so your local process can take over. The value is case-insensitive. `make devbox-run` writes a kubeconfig pointing at the devbox cluster in global kubeconfig, so `kubectl` will target it automatically.

`APPLE_SILICON=True` activates the Apple MLX bridge (requires an M-series Mac).

@Icewind52 Icewind52 Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: make -C manager run needs APPLE_SILICON=True too, but CONTRIBUTING.md doesn't mention it. Without the flag, the manager uses plain config.yaml even with the bridge running, so Apple Silicon tasks fail with APPLE_SILICON_NOT_AVAILABLE, and the message says the backend has no bridge. Could we add make -C manager run APPLE_SILICON=True to this doc?

FLYTE_PYTHON ?= uv run --isolated --no-project --with flyte python
APPLE_SILICON_DIR := $(HOME)/.flyte/apple-silicon
APPLE_SILICON_PORT_ENV = --env FLYTE_DEVBOX_APPLE_SILICON_PORT=$(APPLE_SILICON_PORT)
APPLE_SILICON_SECRET_ENV = --env FLYTE_DEVBOX_APPLE_SILICON_TOKEN_SECRET=$$(cat $(APPLE_SILICON_DIR)/secret)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we use flyte start devbox to execute on apple silicon, we will start the devbox on a local reachable only port here to prevent access from others devices in the same intranet. We should do the same here.

FLYTE_PYTHON ?= uv run --isolated --no-project --with flyte python
APPLE_SILICON_DIR := $(HOME)/.flyte/apple-silicon
APPLE_SILICON_PORT_ENV = --env FLYTE_DEVBOX_APPLE_SILICON_PORT=$(APPLE_SILICON_PORT)
APPLE_SILICON_SECRET_ENV = --env FLYTE_DEVBOX_APPLE_SILICON_TOKEN_SECRET=$$(cat $(APPLE_SILICON_DIR)/secret)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
APPLE_SILICON_SECRET_ENV = --env FLYTE_DEVBOX_APPLE_SILICON_TOKEN_SECRET=$$(cat $(APPLE_SILICON_DIR)/secret)
APPLE_SILICON_SECRET_ENV = --env FLYTE_DEVBOX_APPLE_SILICON_TOKEN_SECRET=$$(cat $(APPLE_SILICON_DIR)/secret)
APPLE_SILICON_PUBLISH_IP = $(if $(filter True,$(APPLE_SILICON)),127.0.0.1:)

Comment on lines 230 to 236
--publish "6443":"6443" \
--publish "30000:30000" \
--publish "30001:5432" \
--publish "30002:30002" \
--publish "30080:30080" \
--publish "30081:30081" \
--publish "30300:30300" \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
--publish "$(APPLE_SILICON_PUBLISH_IP)6443":"6443" \
--publish "$(APPLE_SILICON_PUBLISH_IP)30000:30000" \
--publish "$(APPLE_SILICON_PUBLISH_IP)30001:5432" \
--publish "$(APPLE_SILICON_PUBLISH_IP)30002:30002" \
--publish "$(APPLE_SILICON_PUBLISH_IP)30080:30080" \
--publish "$(APPLE_SILICON_PUBLISH_IP)30081:30081" \
--publish "$(APPLE_SILICON_PUBLISH_IP)30300:30300" \

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add 'make devbox-run APPLE_SILICON=1' for development

5 participants