Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added modules/ray-dashboard/.DS_Store
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should add these to the git-ignore so they dont get commit on accident.

Binary file not shown.
Binary file added modules/ray-dashboard/coder/.DS_Store
Binary file not shown.
24 changes: 24 additions & 0 deletions modules/ray-dashboard/coder/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Ray Coder Module

This Coder module provides easy integration of Ray.io distributed computing framework into your Coder workspaces. It automatically sets up Ray with a dashboard interface and creates a dedicated Python virtual environment.

## Features

- 🚀 **Ray Dashboard**: Web-based interface for monitoring Ray clusters
- 🐍 **Python Virtual Environment**: Isolated environment with Ray and dependencies
- 📊 **Jupyter Integration**: Optional Jupyter kernel with Ray support
- ⚙️ **Customizable**: Configurable Ray extras, packages, and settings
- 🔧 **Auto-setup**: Automatic Ray installation and dashboard startup

## Usage

### Basic Usage

```hcl
module "ray" {
source = "registry.coder.com/modules/ray-dashboard/coder"
version = "1.0.0"
agent_id = coder_agent.main.id
}

```
15 changes: 15 additions & 0 deletions modules/ray-dashboard/coder/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
resource "coder_app" "ray-dashboard" {
agent_id = var.agent_id
slug = var.slug
display_name = var.display_name
icon = var.icon
url = "http://localhost:${var.port}"
subdomain = var.subdomain
share = var.share

healthcheck {
url = "http://localhost:${var.port}"
interval = var.healthcheck_interval
threshold = var.healthcheck_threshold
}
}
21 changes: 21 additions & 0 deletions modules/ray-dashboard/coder/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"display_name": "Ray.io",
"description": "Adds Ray distributed computing framework with dashboard integration to Coder workspaces",
"icon_url": "https://raw.githubusercontent.com/ray-project/ray/master/doc/source/images/ray_logo.png",
"maintainer": {
"name": "Ray Coder Module Contributors",
"email": "",
"url": ""
},
"tags": [
"ray",
"distributed-computing",
"machine-learning",
"python",
"jupyter",
"dashboard"
],
"readme_url": "README.md",
"url": "",
"verified": false
}
11 changes: 11 additions & 0 deletions modules/ray-dashboard/coder/metadata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
display_name: "Ray.io"
description: "Ray.io is a fast and simple framework for building and running distributed applications. This integration provides a dashboard for monitoring and managing Ray clusters within Coder workspaces."
icon_url: "https://raw.githubusercontent.com/ray-project/ray/master/doc/source/images/ray_logo.png"
maintainers:
- github: "michaelvp411"
name: "Michael Vincent Patterson"
tags:
- "ray"
- "dashboard"
- "distributed-computing"
verified: false
14 changes: 14 additions & 0 deletions modules/ray-dashboard/coder/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
output "ray_dashboard_url" {
description = "The URL for accessing the Ray Dashboard"
value = coder_app.ray-dashboard.url
}

output "ray_dashboard_app_id" {
description = "The ID of the Ray Dashboard app resource"
value = coder_app.ray-dashboard.id
}

output "ray_port" {
description = "The port number used by Ray Dashboard"
value = var.port
}
52 changes: 52 additions & 0 deletions modules/ray-dashboard/coder/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
variable "agent_id" {
description = "The ID of the Coder agent to install Ray on"
type = string
}

variable "slug" {
description = "The slug for the Ray Dashboard app"
type = string
default = "ray-dashboard"
}

variable "display_name" {
description = "The display name for the Ray Dashboard app"
type = string
default = "Ray Dashboard"
}

variable "icon" {
description = "The icon URL for the Ray Dashboard app"
type = string
default = "https://raw.githubusercontent.com/ray-project/ray/master/doc/source/images/ray_logo.png"
}

variable "port" {
description = "The port number for the Ray Dashboard"
type = number
default = 8265
}

variable "subdomain" {
description = "Whether to use a subdomain for the Ray Dashboard"
type = bool
default = true
}

variable "share" {
description = "The sharing level for the Ray Dashboard app"
type = string
default = "owner"
}

variable "healthcheck_interval" {
description = "Health check interval in seconds"
type = number
default = 5
}

variable "healthcheck_threshold" {
description = "Health check threshold"
type = number
default = 10
}
11 changes: 11 additions & 0 deletions modules/ray-dashboard/coder/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
terraform {
required_version = ">= 1.0"

required_providers {
coder = {
source = "coder/coder"
version = ">= 0.21.0"
}
}
}

3 changes: 3 additions & 0 deletions modules/ray-dashboard/coder/versions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
versions:
- ref: "v1.0.0"
published_at: "2025-09-18"