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

# Quickstart

> Launch a barebone GPU-accelerated workload

This quickstart deploys a barebone GPU-accelerated workload, a Python container that prints the result of `nvidia-smi`. It illustrates the basic components of a single run and how you can deploy one.

## What you will do

<img style={{ borderRadius: '0.5rem' }} src="https://mintcdn.com/vesslai/q8PNhBb-7_q5awBv/images/get-started/quickstart-main.png?fit=max&auto=format&n=q8PNhBb-7_q5awBv&q=85&s=28a335fb89eab58e9443a6ce604710c7" width="6408" height="4808" data-path="images/get-started/quickstart-main.png" />

* Launch a GPU-accelerated workload
* Set up a runtime for your model
* Run a simple command: `nvidia-smi`

## Installation and setup

After creating a free account on [VESSL](https://app.vessl.ai), install our Python package and get an API authentication. Set your primary **Organization** and **Project** for your account and let's get going.

```bash theme={null}
pip install --upgrade vessl
vessl configure
```

<Note>
  If you encounter the error `ModuleNotFoundError: No module named 'packaging'`,
  please run the command `pip install packaging`.
</Note>

## Writing the YAML file

Launching a workload on VESSL begins with writing a YAML file. Our quickstart YAML is in four parts:

* Compute resource -- typically in terms of GPUs -- this is defined under `resources`
* Runtime environment that points to a Docker Image -- this is defined under `image`
* Run commands executed inside the workload as defined under `run`

Let's start by creating `quickstart.yaml` and define the key-value pairs one by one.

<Steps>
  <Step title="Spin up a compute instance">
    `resources` defines the hardware specs you will use for your run. Here's an
    example that uses our managed cloud to launch an A10 instance. You can see
    the full list of compute options and their string values for `preset` under
    **Resources**. Later, you will be able to add and launch workloads on your
    private cloud or on-premises clusters simply by changing the value for
    `cluster`.

    ```yaml theme={null}
    resources:
      cluster: vessl-oci-sanjose
      preset: gpu-a10-small
    ```
  </Step>

  <Step title="Configure a runtime environment">
    VESSL uses Docker images to define a runtime. We provide a set of base
    images as a starting point but you can also bring your own custom Docker
    images by referencing hosted images on **Docker Hub** or **Red Hat Quay**. You
    can find the full list of images and the dependencies for the latest build
    [here](https://quay.io/repository/vessl-ai/kernels?tab=tags\&tag=py39-202310120824).
    Here, we'll use the latest go-to PyTorch container from **NVIDIA NGC**.

    ```yaml theme={null}
    resources:
      cluster: vessl-oci-sanjose
      preset: gpu-a10-small
    image: quay.io/vessl-ai/torch:2.3.1-cuda12.1
    ```
  </Step>

  <Step title="Write a run command">
    Now that we defined the specifications of the compute resource and the
    runtime environment for our workload, let's run `nvidia-smi`. We can do this
    by defining a pair of `workdir` and `command` under `run`.

    ```yaml theme={null}
    resources:
      cluster: vessl-oci-sanjose
      preset: gpu-a10-small
    image: quay.io/vessl-ai/torch:2.3.1-cuda12.1
    run:
      - workdir: /root
        command: nvidia-smi
    ```
  </Step>

  <Step title="Add metadata">
    Finally, let's polish up by giving our **Run** a name and description. Here's
    the completed `quickstart.yaml`:

    ```yaml theme={null}
    name: Quickstart
    description: Run "nvidia-smi"
    resources:
      cluster: vessl-oci-sanjose
      preset: gpu-a10-small
    image: quay.io/vessl-ai/torch:2.3.1-cuda12.1
    run:
      - workdir: /root
        command: nvidia-smi
    ```
  </Step>
</Steps>

## Running the run

Now that we have a completed YAML, we can run the workload with `vessl run`.

`vessl run create -f quickstart.yaml`

<img style={{ borderRadius: '0.5rem' }} src="https://mintcdn.com/vesslai/q8PNhBb-7_q5awBv/images/get-started/quickstart-run.png?fit=max&auto=format&n=q8PNhBb-7_q5awBv&q=85&s=641d333482546e98a3096f23896c2bd0" width="985" height="506" data-path="images/get-started/quickstart-run.png" />

Running the command will verify your YAML and show you the current status of the run. Click the output link in your terminal to see full details and a realtime logs of the **Run** on the web, including the result of the run command.

<img style={{ borderRadius: '0.5rem' }} src="https://mintcdn.com/vesslai/q8PNhBb-7_q5awBv/images/get-started/quickstart-result.png?fit=max&auto=format&n=q8PNhBb-7_q5awBv&q=85&s=d169570dad41e8d438643e60992da1ff" width="1440" height="813" data-path="images/get-started/quickstart-result.png" />

## Behind the scenes

When you `vessl run`, VESSL performs the following as defined in `quickstart.yaml`:

1. Launch an empty Python container on the cloud with 1 NVIDIA A10 GPU.
2. Configure runtime with CUDA compute-capable PyTorch 22.09.
3. Execute `nvidia-smi` and print the result.

## Using our web interface

You can repeat the same process on the web. Head over to your **Organization**, select a project, and create a **New run**.

<div
  style={{
position: 'relative',
paddingBottom: 'calc(66.6667% + 41px)',
height: '0px',
}}
>
  <iframe
    src="https://demo.arcade.software/XWpYqR5fAv0RjJL2GP4M?embed&embed_mobile=tab&embed_desktop=inline&show_copy_link=true"
    frameBorder="0"
    loading="lazy"
    webkitAllowFullScreen=""
    mozAllowFullScreen=""
    title="Dashboards"
    style={{
  position: 'absolute',
  top: '0px',
  left: '0px',
  width: '100%',
  height: '100%',
  colorScheme: 'light',
}}
  />
</div>

## What's next?

Now that you've run a barebone workload, continue with our guide to launch a Jupyter server and host a web app.

<CardGroup cols={2}>
  <Card title="GPU-accelerated notebook" icon="laptop" href="gpu-notebook">
    Launch a Jupyter Notebook server with an SSH connection
  </Card>

  <Card title="Image Generation Playground" icon="image" href="image-generation">
    Launch an interactive web application for image generation
  </Card>

  <Card title="Phi-4 Fine-tuning" icon="wrench" href="phi-4-finetuning">
    Fine-tune Phi-4 with counselling datasets
  </Card>

  <Card title="Phi-4-mini-reasoning deployment" icon="server" href="phi-4-deployment">
    Serve & deploy vLLM-accelerated Phi-4-mini-reasoning
  </Card>
</CardGroup>
