Documentation
Search…
Launch with Kubernetes

Beta product in active development

Interested in Launch? Reach out to your account team to talk about joining the customer pilot program for W&B Launch.
Pilot customers need to use AWS EKS or SageMaker to qualify for the beta program. We ultimately plan to support additional platforms.
Kubernetes is an open-source containerization and deployment system. With Launch, you can build and run jobs on any Kubernetes cluster, including self-managed clusters as well as clusters managed through cloud services like Google Kubernetes Engine (GKE) or Amazon Elastic Kubernetes Service (EKS).

Kubernetes quickstart

Requirements

  • Download and install the kubectl command-line tool, set up a cluster on your chosen infrastructure, and configure your cluster.
  • Make sure you have the latest version of wandb and you have Launch enabled by adding instant replay to your W&B profile.
Run wandb launch <URI> --resource kubernetes --resource-args <JSON args>, or select the Kubernetes option from the web UI.

Resource args reference

The arguments below should be supplied as a JSON dictionary under the key kubernetes and passed in via --resource-args or via the web UI. If you already configure Kubernetes jobs with a YAML file, you can pass that in via the job_spec key; some commonly used options are configurable via Launch resource args outside of the job_spec for convenience. None of the below arguments are required to successfully run Launch with Kubernetes.
Name
Type
Description
config_file
str
Path to a Kubernetes config file. If not set, defaults to config found at $HOME/.kube/config. If running in a Kubernetes pod, this is ignored and the cluster config is loaded instead.
job_spec
str: path to YAML or JSON file, or JSON-encoded string
YAML- or JSON-formatted Kubernetes Job spec. For values specified in both a Job spec and at the Launch resource args level, the resource arg value will take precedence.
registry
str
Docker registry to host the built image on. If unspecified, built image is hosted on local registry. Ignored if an image is provided by the user.
namespace
str
Sets metadata.namespace in a V1Job. If unspecified, defaults to current active namespace.
job_name
str
Sets metadata.name in a V1Job.
job_labels
dict[str, str]
Sets metadata.labels in a V1Job.
backoff_limit
int
See V1JobSpec for this and the following fields.
completions
int
--
parallelism
int
--
suspend
bool
--
restart_policy
str
See V1PodSpec for this and the following fields.
preemption_policy
str
--
node_name
str
--
node_selectors
dict[str, str]
--
container_name
str
Sets name in a V1Container.
env
dict[str, str]
Sets env in a V1Container.
resource_requests
dict[str, str]
Sets resources.requests in a V1Container.
resource_limits
dict[str, str]
Sets resources.limits in a V1Container.