Skip to content

Instantly share code, notes, and snippets.

View benarent's full-sized avatar
💼

Ben Arent benarent

💼
View GitHub Profile

Serverless Claude Code Instances with Persistent Compute

1. Problem

We need a way to give each Discord channel its own persistent "computer" running Claude Code CLI, where:

  • The computer survives across sessions (disk persists)
  • It wakes up fast when a user sends a message (< 10s, ideally < 5s)
  • It costs near-zero when idle

Teleport AI - QuickStart Task Challenge.
https://lu.ma/ozt7jtq5

Introduction

Teleport is an open source Access Platform that provides secure access to share web-apps, Jupyter notebooks, and APIs via Teleport VNET. This guide will help you set up Teleport to share your demo app or endpoint. Prerequisites

  • A computer running macOS or Linux
  • Admin access to your machine
  • Basic familiarity with command-line interfaces
version: '3.8'
services:
ollama:
image: ollama/ollama
container_name: ollama
ports:
- 11434:11434
volumes:
- ./ollama:/root/.ollama
#cloud-config
# created MOTD
# setup pam-exec
# setup teleport.yaml
write_files:
- path: /etc/motd
content: |
hello teleport user.
- path: /etc/pam.d/teleport

Hello World

#
# Example resource for a trusted cluster with RBAC
#
# IMPORTANT: only one field (enabled) can be changed after a cluster is created.
#
kind: trusted_cluster
version: v2
metadata:
# the name used for quick identification of this leaf cluster
name: CAN-WE-AUTOPOPULATE-this. ( e.g. hostname of the leaf cluster )
https://www.reddit.com/r/pop_os/comments/cju5ym/installing_pop_os_alongside_windows_10_on/
#
# Example resource for a role
#
kind: role
version: v3
metadata:
# insert the name of your role here:
name: role_name
spec:
# SSH options used for user sessions
> teleport start \
--roles=node \
--token=secret-value \
--ca-pin=sha256:d88fb278a51769f59f15402f242b50c98eaec4e4e467d28ecc743e754228751a \
--auth-server=10.1.2.92:3025
teleport start \
--roles=node \
--token=484a9ddb96b1e8899bb165c8237d90a7 \
--ca-pin=sha256:d88fb278a51769f59f15402f242b50c98eaec4e4e467d28ecc743e754228751a \
--auth-server=10.1.2.92:3025