> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baseten.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a workstation

> Start an SSH-ready GPU machine on training infrastructure with one Baseten CLI command, connect to it, and keep the files in its home directory after it ends.

A workstation is a training job that exists for interactive work over SSH. [`baseten train workstation create`](https://docs.baseten.co/reference/cli/baseten/train) starts one without a `config.py`: it configures an SSH session with `InteractiveSessionTrigger.ON_STARTUP` and runs `sleep infinity` to keep the container alive. A multi-node workstation runs the Slurm bootstrap instead.

## Prerequisites

* Training Jobs enabled for your organization. See [Request access](https://docs.baseten.co/training/overview.md#request-access).
* SSH set up on your machine. See [Set up SSH](https://docs.baseten.co/training/ssh-setup.md).
* [uv](https://docs.astral.sh/uv/) on your `PATH`. The Baseten CLI runs Truss through uv to push jobs and create workstations.

## Create and connect

> [!WARNING]
>
> A workstation holds its GPUs and is [billed per minute](https://docs.baseten.co/organization/billing.md#training-and-fine-tuning) while it runs. Disconnecting doesn't stop it, so stop the workstation when you finish. Its SSH session expires, so save files you want to keep to the project cache, [`$BT_PROJECT_CACHE_DIR`](https://docs.baseten.co/reference/sdk/training#environment-variables), before then. See [Session expiry](https://docs.baseten.co/training/manage-sessions.md#session-expiry) for how the timeout works.

**To create a workstation and connect**:

1. Create the workstation. For example:

   ```sh Terminal theme={"system"}
   # Default: 1x H100
   baseten train workstation create

   # 4x H200 with custom project name
   baseten train workstation create --accelerator H200 --gpu-count 4 --project my-dev-box

   # Custom base image
   baseten train workstation create --image pytorch/pytorch:2.7.0-cuda12.8-cudnn9-runtime
   ```

   The output lists the SSH host of each node, `training-job-<job_id>-<node>.ssh.baseten.co`. Copy `<job_id>` from it. The output also prints Truss commands for logs and stopping; use the Baseten CLI commands on this page instead. For all options, see [`baseten train workstation`](https://docs.baseten.co/reference/cli/baseten/train).

2. When [`baseten train job describe --job-id <job_id>`](https://docs.baseten.co/reference/cli/baseten/train) shows `Status: running`, connect:

   ```sh Terminal theme={"system"}
   ssh training-job-<job_id>-0.ssh.baseten.co
   ```

   You're connected when you see a shell prompt like `root@baseten-training-job-<job_id>-multinode-0:~#`.

3. When you finish, stop the workstation and confirm when prompted:

   ```sh Terminal theme={"system"}
   baseten train job stop --job-id <job_id>
   ```

   ```text Output theme={"system"}
   Stopped training job <job_id>. Synced checkpoints remain accessible.
   ```

For multi-node workstations, pass `--node-count` instead of `--gpu-count`: Baseten bootstraps a Slurm cluster across the nodes. See [Slurm workstations](https://docs.baseten.co/training/slurm.md).

## Keep files in your home directory

Persistent home directories are in beta. [Contact us](mailto:support@baseten.co) to enable them for your organization.

`baseten train workstation create` doesn't have a `--persistent-home` flag. To keep files in your home directory after the workstation ends, run the Truss workstation command through the Baseten CLI with `--persistent-home`:

```sh Terminal theme={"system"}
baseten truss train workstation --persistent-home
```

Baseten places `$HOME` on the project cache at `$BT_PROJECT_CACHE_DIR/homes/<job_id>` and deletes it 7 days after the workstation ends. A new workstation gets a new home directory; to read an earlier one, open `$BT_PROJECT_CACHE_DIR/homes/<earlier_job_id>`. For a job defined in `config.py`, set [`persistent_home=True`](https://docs.baseten.co/reference/sdk/training#param-persistent-home) and `enabled=True` on its [`CacheConfig`](https://docs.baseten.co/reference/sdk/training#cacheconfig).

## Next steps

* [Slurm workstations](https://docs.baseten.co/training/slurm.md): Run a multi-node workstation with a Slurm cluster.
* [Connect to a training job over SSH](https://docs.baseten.co/training/ssh.md): Transfer files and open the container in your editor.
