Skip to content

Latest commit

 

History

History
94 lines (62 loc) · 2.64 KB

File metadata and controls

94 lines (62 loc) · 2.64 KB

NVIDIA OSMO - Developer Guide

For developers who want to try out OSMO or test out their changes, this guide will demonstrate how to run OSMO using Bazel:

Prerequisites

Install the required tools for developing OSMO.

Set the following environment variables:

export HOST_IP=$(ifconfig | grep "inet " | grep -Fv 127.0.0.1 | grep 10. | awk '{print $2}' | head -1)

Compile OSMO with Bazel

Bazel mode runs OSMO services directly as local processes using bazel, providing faster iteration for development.

Start OSMO Services

bazel run @osmo_workspace//run:start_service -- --mode bazel

This command:

  • Creates postgres, redis, and localstack-s3 docker containers if they do not exist
  • Starts core OSMO services (osmo, router) using bazel and the UI using pnpm (from src/ui/)

Start OSMO Backend

After OSMO services are started, start the backend:

bazel run @osmo_workspace//run:start_backend -- --mode bazel

This command:

  • Checks for a KIND backend cluster that can be used for compute
    • If one is not accessible, a new KIND cluster is created for compute
  • Starts backend operators (listener, worker) using bazel

Update Configuration

bazel run @osmo_workspace//run:update_configs -- --mode bazel

This command:

  • Updates workflow configuration with local development settings
  • Configures object storage endpoints and credentials
  • Sets up backend image configurations
  • Sets the default pool for the user profile

Access OSMO

The OSMO UI and APIs can be accessed at: http://$HOST_IP:8080

Next steps

Log into OSMO using the CLI:

bazel run @osmo_workspace//src/cli -- login http://$HOST_IP:8000 --method=dev --username=testuser

Test your setup with hellow_world.yaml:

bazel run @osmo_workspace//src/cli -- workflow submit ~/path/to/osmo/cookbook/tutorials/hello_world.yaml

The workflow should successfully submit and run to a "completed" state.