Prerequisites
Before you begin, make sure you have the following:- An account with SaladCloud . If you don’t have one yet, you can sign up for a free trial at https://portal.salad.com
- A project in SaladCloud . If you don’t have a project yet, you can create one by following the instructions in the SaladCloud documentation.
- A container image that you want to deploy. If you don’t have a container image yet, you can build one using a tool like Docker.
Step 1: Obtain Your API Key
To authenticate your API requests, you’ll need an API key. To obtain your API key, follow these steps:- Log in to your SaladCloud account at https://portal.salad.com
- Click on your profile in the top right corner of the page, then click API Keys.
- Copy the API key that is displayed. You’ll need this in the next step.
Step 2: Deploy the Container Image
To deploy a container group using the SaladCloud Public API, you’ll need to send a POST request with specific parameters inside the data field along with headers. Here’s how to do it: Send a POST request to the following URL:{organization_name}
and {project_name}
with the name of your organization and project, respectively.
Include the following headers in your request:
Salad-Api-Key: {API_KEY}
accept: application/json
content-type: application/json
curl
Step 3: Select Multiple GPUs
To enable the use of multiple GPUs within a container, you’ll need to:-
Retrieve GPU IDs : Begin by obtaining the list of available GPUs. To do this, execute the following curl command
- Note GPU IDs : Once you receive the response, identify and make note of the unique IDs corresponding to the GPUs you intend to use.
-
Configure Your Workload : When setting up your workload, include the GPU IDs in the gpu_classes field. For example,
if you plan to utilize GPUs like 3090s, 3090Tis, and 4090s, structure your configuration like this
Step 4: Check the Deployment Status
After you send the POST request in previous step, SaladCloud will begin the process of deploying your container image. To check the status of the deployment, you can send a GET request to the following URL.curl
{organization_name}
, {project_name}
, and {container_group_name}
with the name of your organization,
project, and the container group you want to check, respectively.
Include the following headers in your GET request:
Salad-Api-Key: {API_KEY}
accept: application/json
curl