Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add FLAME support 🔥 #2629

Merged
merged 6 commits into from
Jun 7, 2024
Merged

Conversation

chrismccord
Copy link
Contributor

Note this will require a FLAME release phoenixframework/flame#40

Example notebook deployed on fly.io with working branch:

flame_git_ref = "cm-code-paths"
System.put_env("FLAME_GIT_REF", flame_git_ref)
Mix.install([:kino, {:flame, github: "phoenixframework/flame", ref: flame_git_ref}])

Kino.start_child!(
  {FLAME.Pool,
    name: :flame_test,
    code_sync: [
      verbose: true,
      copy_paths: true,
      sync_paths: [Path.join(System.tmp_dir!(), "livebook_runtime")]
    ],
    min: 1,
    max: 1,
    max_concurrency: 10,
    backend: {FLAME.FlyBackend, 
      cpu_kind: "performance", cpus: 4, memory_mb: 8192, 
      token: System.fetch_env!("FLY_API_TOKEN"),
      env: Map.take(System.get_env(), ["LIVEBOOK_COOKIE", "FLAME_GIT_REF"]),
    },
    idle_shutdown_after: :timer.minutes(5),
    log: :info}
)


defmodule Foo do
  def test(args), do: "works #{inspect(args)} #{node()}"
end

FLAME.call(:flame_test, fn ->
  Foo.test(1234)
end)

@CLAassistant
Copy link

CLAassistant commented May 31, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

github-actions bot commented May 31, 2024

Uffizzi Preview deployment-52467 was deleted.

@jonatanklosko
Copy link
Member

Just the CLA and LGTM 🔥

@josevalim
Copy link
Contributor

@jonatanklosko please merge this whenever you are ready :)

@jonatanklosko jonatanklosko merged commit 8e4985b into livebook-dev:main Jun 7, 2024
6 of 7 checks passed
@mruoss
Copy link
Contributor

mruoss commented Jun 11, 2024

Love this!!! 💙 Will there be a release anytime soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants