# Examples

All examples are in [github.com/c3-research/c3-examples](https://github.com/c3-research/c3-examples). Each folder has a `.c3` and runs as is.

```
git clone https://github.com/c3-research/c3-examples.git
cd c3-examples/<example>
c3 deploy -f
c3 pull
```

Or point a coding agent at the folder: "Deploy this directory to C3, wait for it, and show me the results."

| Example        | Shows                                                                  | Hardware | Time   |
| -------------- | ---------------------------------------------------------------------- | -------- | ------ |
| `jax-matmul`   | Python mode, `uv` dependencies, a benchmark plot saved as an artifact  | `l40`    | 10 min |
| `hello.sbatch` | A legacy Slurm script deployed unchanged with `c3 deploy hello.sbatch` | 1 GPU    | 5 min  |

## jax-matmul, step by step[​](#jax-matmul-step-by-step "Direct link to jax-matmul, step by step")

The `.c3`:

```
project: jax-matmul-example
script: run.sh
hardware: l40
time: "00:10:00"

python:
  project: ./

output:
  - ./results
```

`run.sh` is one line, `python3 train.py`. The `pyproject.toml` lists `jax[cuda12]`, `numpy` and `matplotlib`; C3 installs them with `uv` before the script runs.

`train.py` multiplies large matrices on the GPU, times them, prints the timings to the log and saves `results/benchmark.png`. After the job finishes, `c3 pull` downloads `./job_<id>/results/`.
