Workbox
  • Who it's for
  • Models
  • How it runs
  • Join an event
  • Docs
Sign inGet started
  • Who it's for
  • Models
  • How it runs
  • Join an event
  • Docs
  • Sign in

Docs

  • Getting started
  • Boxes
  • SSH into a box
  • CLI
  • The job settings
  • Metrics and samples
  • Serve your model
  • Deploy a model
  • The management API
  • Box templates
  • Environments and events
Workbox

The cloud for AI workloads.

Product

  • Who it's for
  • Models
  • How it runs
  • Docs

Events

  • Join an event
  • Run a workshop

© Workbox

Box templates

What a box has installed, for projects and environments.

A box template is the recipe for a box: what is installed, what is downloaded, and how it starts. Workbox builds it once, so a box starts with everything in place instead of installing it each time. Projects and labs use the same recipe.

The recipe

image: pytorch                              # cpu, pytorch, tensorflow or jax
size: small                                 # cpu-1 to cpu-8, small, medium, large, xlarge, or 1x H100
source: github://amahle/tinystories@main    # a public repo cloned into ~/work
tools: [jupyter, vscode]                    # besides the terminal, which every box has; both unless you say
opens: jupyter                              # the tab the box shows first; the terminal unless you say
packages:
  pip: [transformers==4.46, polars]
  apt: [ffmpeg]
  npm: [serve]
extensions: [ms-python.python]              # VS Code extensions, from Open VSX
inputs:
  - hf://roneneldan/TinyStories             # downloaded into ~/inputs/<name>
setup:
  - python prepare.py                       # commands run in ~/work, after the rest
ports: [8000]                               # your app's ports, each a Preview tab

Every field is optional. Without one, a box gets the cpu image, 2 vCPUs, Jupyter and VS Code besides its terminal, and opens on the terminal. A tool starts the first time you open it; the box is ready as soon as its terminal is.

For a project

Put the recipe under box: in the project's defaults (the project page's settings) or in workbox.yaml:

run: python train.py
box:
  size: small
  packages:
    pip: [transformers, accelerate]

Start box on the project's page starts a box with it, and the box can Run as job into the project.

For an environment

In the environment editor, the Box section sets the image, size, code from GitHub and preview ports, and Packages sets pip, npm and apt packages, VS Code extensions, datasets and models, and setup commands. Tool is what it opens in: an environment has one, its opens, and no tools. Starter files are part of the recipe too.

Saving the environment builds its box; the Builds panel shows each provider's build, and its log when one fails. Until a build is ready, boxes install everything when they start, which takes longer.

When it builds again

A template is built again only when what goes into it changes: the image, the packages, the commands, the inputs or an environment's starter files. Changing the tools or the size never needs a new build.

Next: Environments and events

Sign inGet started