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.
nvidia-smi
After creating a free account at 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.
ModuleNotFoundError: No module named 'packaging'
, please run the command pip install packaging
.Launching a workload on VESSL AI begins with writing a YAML file. Our quickstart YAML is in four parts:
resources
image
run
Let’s start by creating quickstart.yaml
and define the key-value pairs one by one.
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-premise clusters simply by changing the value for cluster
.
VESSL AI 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. Here, we’ll use the latest go-to PyTorch container from NVIDIA NGC.
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
.
Finally, let’s polish up by giving our Run a name and description. Here’s the completed quickstart.yaml
:
Now that we have a completed YAML, we can run the workload with vessl run
.
Running the command will verify your YAML and show you the current status of the workload. 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.
When you vessl run
, VESSL AI performs the following as defined in quickstart.yaml
:
nvidia-smi
and print the result.You can repeat the same process on the web. Head over to your Organization, select a project, and create a New run.
Now that you’ve run a barebone workload, continue with our guide to launch a Jupyter server and host a web app.
Launch a Jupyter Notebook server with an SSH connection
Launch an interactive web application for Stable Diffusion
Fine-tune Llama 3.1-8B with instruction datasets
Serve & deploy vLLM-accelerated Llama 3.1-8B