API How-Tos
The Cloud API lets you manage Cloud GPU VMs programmatically using conventional HTTP requests. You can use the API to create, delete, and retrieve information about your Cloud GPU VMs.
Furthermore, you need templates to provision Cloud GPU VMs, but templates are not compatible with servers that support full flex configuration.
Cloud GPU VM workflow
Request access
To begin using the Cloud GPU VM, send a request to IONOS Cloud Support. For more information about the process, see Cloud GPU VM Access.
Discovery and selection
Review Cloud GPU VM template specifications to select the appropriate template for your needs. For more information about a specific template, use the Retrieve a Template API.
Use this template
UUIDto make an API request call to create a Cloud GPU VM.
Create a Cloud GPU VM
Initiate a Cloud GPU VM creation request through API with the following:
The selected GPU ID
Linux-based operating system
Network settings
SSH keys, Cloud-init script, or other authentication methods
Result: The VM with the attached GPU is provisioned.
Access and setup
Connect to VM using one of the following options:
Install NVIDIA drivers. For more information, refer to the NVIDIA documentation.
Run the following command in your terminal or command prompt to verify if the Cloud GPU VM is accessible:
nvidia-smi
Result: A successful output should display the driver version, the GPU model(s), the GPU temperature, and the current memory usage. If the command is not found or returns an error, your drivers may be missing or the GPU is not properly installed.
Install required framework dependencies. Use a package manager like
piporcondato install your chosen framework, ensuring you select the GPU-enabled version.
Install the version that matches your CUDA toolkit. For example, CUDA 12.1.
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121Install the standard package. It automatically detects and uses CUDA if installed correctly.
pip install tensorflowUse the server for your use case
Management
Start, restart, or delete the Cloud GPU VM as needed.
Monitor costs and usage. For more information, see Cost Alert and Cost & Usage.
Cleanup
Back up your results and data. For more information, see Install Acronis Backup Agent on Linux.
Delete the Cloud GPU VM from the VDC.
Quick Links
Last updated
Was this helpful?