From c060efba20ba7d1756cee99ecbd0f07cf3d43ab1 Mon Sep 17 00:00:00 2001 From: Michael Ruoss Date: Thu, 5 Sep 2024 18:33:55 +0200 Subject: [PATCH] Add smart cell definition FLAME runner cell with k8s backend (#2762) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Jonatan KÅ‚osko --- lib/livebook/runtime/definitions.ex | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/lib/livebook/runtime/definitions.ex b/lib/livebook/runtime/definitions.ex index 2f3bac1a2..224595a80 100644 --- a/lib/livebook/runtime/definitions.ex +++ b/lib/livebook/runtime/definitions.ex @@ -57,7 +57,12 @@ defmodule Livebook.Runtime.Definitions do kino_flame = %{ name: "kino_flame", - dependency: %{dep: {:kino_flame, "~> 0.1.0"}, config: []} + dependency: %{dep: {:kino_flame, "~> 0.1.3"}, config: []} + } + + flame_k8s_backend = %{ + name: "flame_k8s_backend", + dependency: %{dep: {:flame_k8s_backend, "~> 0.5"}, config: []} } jason = %{ @@ -75,6 +80,11 @@ defmodule Livebook.Runtime.Definitions do dependency: %{dep: {:xlsx_reader, "~> 0.8.5"}, config: []} } + yaml_elixir = %{ + name: "yaml_elixir", + dependency: %{dep: {:yaml_elixir, "~> 2.0"}, config: []} + } + windows? = match?({:win32, _}, :os.type()) nx_backend_package = if(windows?, do: torchx, else: exla) @@ -213,8 +223,12 @@ defmodule Livebook.Runtime.Definitions do name: "FLAME runner cell", requirement_presets: [ %{ - name: "Default", + name: "Fly", packages: [kino_flame] + }, + %{ + name: "Kubernetes", + packages: [kino_flame, flame_k8s_backend, yaml_elixir] } ] }