Skip to content

GPUaaS ​

Introduction ​

GPUaaS (GPU-as-a-Service) provides secure, on-demand access to high-performance GPU clusters via SSH, offering direct control over computing resources. This service is designed for researchers, engineers, and AI teams who require powerful computational capabilities for their machine learning and deep learning workloads.

Functionalities ​

Direct SSH Access ​

Users can securely access the GPU cluster via SSH, providing direct control over computing resources. This allows for flexible and efficient management of AI workloads.

Scalable GPU Resources ​

GPUaaS offers scalable access to high-performance NVIDIA GPU clusters, enabling users to handle large-scale AI and deep learning tasks with ease.

Customizable Environments ​

Users can bring their own environments and tools, ensuring compatibility with their existing workflows and maximizing productivity.

Data Versioning, Experiment tracking, Pipeline definition ​

Using the ClearML library, tools are available for data versioning, automated experiment tracking, and pipeline management. It ensures reproducibility, efficient resource management, and enhanced collaboration. For more information, visit ClearML Documentation.

Step-by-Step Guide ​

1. Setup ​

  1. Navigate to GPUaaS: Log in to the platform and navigate to the GPUaaS section.

    Navigate to GPUaaS

  2. Configure Environment: Create a new instance by selecting the following options:

    • Instance Name: Choose a name for your instance.
    • Docker Image Selection: Select the appropriate Docker image for your workload. For example, you can use a custom Docker image from your repository:
    plaintext
    my-custom-repo/my-docker-image:latest

    Note: Ensure that when building Docker images for your instances, the installation of dependencies is redirected through your private proxy to fetch the required resources. By default, the provided images will attempt to fetch dependencies through the Swisscom Artifactory.

    • Queue and Agent Setting: Select the NVIDIA hardware to attach to your instance. It will configure the queue and agent settings using the ClearML library for experiment tracking. See GPU Partitioning through MIG for the available MIG profiles.
    • Open HTTP port: Optional, expose a container Port to your tenant network. If a container port is exposed, it creates an endpoint which is mapped to the specifyed port. To get the endpoint, select "configuration" in the list of running instances -> View details (bottom right of overlay) -> configuration (tab) -> user properties -> see http_browser_endpoint & hattp_endpoint
    • Persistent Workspace Path: Set up a persistent workspace path in your container to replicate content across different instances, cloning from a previous instance.
    • Idle Time Configuration: Configure the idle time settings to manage resource usage efficiently. Configure Environment

2. Connection ​

  1. Login to GPU Cluster: Once new GPUaaS instance is running, it's possible to connect via ssh following CONNECT COMMAND and PASSWORD.
  2. Montioring resources: CPU and GPU usage can be monitored through dashboards, while console logs offer real-time insights to supervise the correct working of the instance.

3. Environment Setup ​

  1. Create Virtual Environment: Create and activate a Python virtual environment.
    sh
    cd /ephemeral
    python3 -m venv myenv
    source myenv/bin/activate

Containerized Application Launcher ​

The Containerized Application Launcher enables remote execution of application containers with automated network routing, data persistence, and resource monitoring. This feature allows you to deploy custom applications, web services, and development environments with enterprise-grade security and scalability.

Key Features:

  • Persistent Workspaces: Restore previous session states when relaunching instances
  • Flexible Network Configuration: Secure HTTPS access or raw TCP connections
  • Resource Monitoring: Real-time CPU, GPU, and memory utilization tracking
  • Load Balancing: Multiple instances behind a single endpoint via AI Application Gateway

App Instance Dashboard ​

Once launched, you can monitor your app instance status and performance through the dashboard:

Instance Information:

  • Idle Time: Current idle duration
  • Restored Workspace: Previous session ID (if workspace was restored)
  • Current Session ID: Unique identifier for this instance

Access Endpoints:

  • Network HTTPS: Secure access links for containerized applications
  • Endpoint: Direct URL for programmatic access (requires authentication token)
  • Browser Link: Opens application in web browser with automatic authentication

Performance Metrics:

  • Total Number of Requests: Request volume over time
  • Latency: Response time (ms) over time
  • Server Resources: CPU / GPU / vMem utilization graphs

Containerized Application Launcher

Console Logs: Real-time activity log showing environment setup progress and status changes

Configuration Guide ​

Launching a New Instance ​

  1. Navigate to Applications → Containerized App Launcher
  2. Click Add Button
  3. Configure the instance parameters (see below)
  4. Click Launch to start the instance

Configuration Options ​

ParameterDescriptionRequired
Application Session NameDescriptive name for your instanceYes
Application Instance ProjectClearML Project for storage and organizationYes
Container ImageDocker image to use for your applicationYes
Application Execution CommandCommand to start the application (overrides container entrypoint)Yes
Application Execution DirectoryWorking directory for the commandOptional
QueueClearML Queue for task enqueueing (ensure agent is assigned)Yes
Network RoutingSelect: None, TCP (raw), or HTTPSYes
Container Internal PortInternal port number to expose when using TCP or HTTPS routing (e.g., 8000 for web apps, 5432 for databases). No default value - must be specifiedConditional*
AI Gateway RouteSelect a pre-configured static route from available routes (type: path). If none selected, a dynamic route is createdOptional
Idle Time Limit (Hours)Maximum idle time before automatic shutdownYes
Persistent Workspace PathDirectory for session persistence (e.g., ~/workspace)Optional

*Conditional: Required only when Network Routing is set to TCP or HTTPS

Network Routing Options ​

None

  • No external network access
  • Application runs in isolated environment
  • Suitable for batch processing and internal computations

TCP (Raw)

  • Direct TCP connection to the container
  • Lower latency, suitable for database connections or custom protocols
  • Requires manual connection management
  • Container Internal Port: Specify the internal port to expose (e.g., 5432 for PostgreSQL, 8000 for web apps)
  • AI Gateway Route: Optional - provides static endpoint (no authentication)

Note: TCP routing does not support authentication. AI Application Gateway provides static endpoint only, ensuring stable connection endpoints without dynamic route changes.

HTTPS

  • Secure web-based access with authentication
  • Automatic SSL/TLS encryption
  • Recommended for web applications and APIs
  • Integrates with AI Application Gateway for load balancing and authentication
  • Container Internal Port: Specify the internal port to expose (e.g., 8000 for web apps)
  • AI Gateway Route: Optionally select a pre-configured static route from your administrator

An AI Application Gateway can be configured to expose your internal containerized application via a static endpoint. Follow the procedure described at AI Application Gateway Setup.

Environment Configuration ​

Environment Variables: Additional environment variables to set inside the container:

ini
MY_API_KEY=your-api-key
DATABASE_URL=postgresql://user:pass@host:5432/db
CUSTOM_CONFIG=value

Configuration Files: Inject configuration files into the container (YAML, JSON, INI, certificates, scripts).

Advanced Configuration ​

ParameterDescription
Container ArgumentsAdditional arguments passed to the container
Application Session TagsComma-separated tags for organization
Restore from Session IDRestore state from a previous session
Idle Network Threshold (MB/s)Network throughput below which session is considered idle
Idle CPU Threshold (%)CPU utilization below which session is considered idle
Idle GPU Threshold (%)GPU utilization below which session is considered idle

Deploy LLMs/VLMs with vLLM ​

Overview ​

GPUaaS supports deploying Large Language Models (LLMs) and Vision Language Models (VLMs) using vLLM, a high-throughput and memory-efficient inference server. This guide covers deploying models via custom Docker images with wizard-based configuration and optional gateway setup for load balancing and authentication.

Key Benefits:

  • High-throughput inference with continuous batching
  • Production-ready OpenAI-compatible API
  • Support for all models compatible with vLLM 0.19.1
  • Flexible deployment with load balancing and token-based authentication

Docker Images ​

For Testing/Experimentation:

  • Standard tenants: aip-docker-local.artifactory.swisscom.com/vllm-model-deployment:v1.8
  • Internal tenants: aip-docker-local.artifactory.swisscom.com/vllm-model-deployment:v1.8-swisscom

Note: These pre-built images are provided for testing and evaluation purposes only.

For Production:

We recommend building your own Docker image to maintain full control over dependencies, versions, and security. Push your custom image to your organization's artifactory or registry.

Dockerfile Reference:

dockerfile
#
# Dockerfile used to build the GPUaaS image for customers (vLLM extended)
#

FROM nvidia/cuda:12.8.0-cudnn-runtime-ubuntu22.04

# Set environment variables to avoid interactive prompts
ENV DEBIAN_FRONTEND=noninteractive

# Enable faster Hugging Face downloads
ENV HF_HUB_ENABLE_HF_TRANSFER=1
# Define the Hugging Face cache directory explicitly for volume mounting
ENV HF_HOME=/ephemeral/.hf_home

# Install dependencies
RUN apt-get update && \
    apt-get upgrade -y && \
    apt-get install -y --no-install-recommends \
      build-essential \
      curl \
      git \
      jq \
      openssh-server \
      python3 \
      python3-dev \
      python3-pip \
      python3-venv \
      python3-virtualenv && \
    rm -rf /var/lib/apt/lists/*

# Pip configuration
ENV VIRTUALENV_PIP=22.2.2
ENV PIP_DISABLE_PIP_VERSION_CHECK=1
ENV PIP_RETRIES=0
ENV PIP_TIMEOUT=3

# Install Python packages
COPY vLLM-Model-Deployment/requirements.txt .
RUN pip3 install --no-cache-dir -r requirements.txt

# Setup SSH server
RUN mkdir /var/run/sshd

# Expose SSH port
EXPOSE 22

# Start SSH server
CMD ["/usr/sbin/sshd", "-D"]

Environment Variables Required:

bash
# HuggingFace endpoint - Configure to mirror HuggingFace through your Artifactory
export HF_ENDPOINT="https://<your-artifactory-domain>"

# Optional: HuggingFace token for gated models
export HF_TOKEN="your-huggingface-token"

Note: Configure HF_ENDPOINT to point to your organization's Artifactory instance for mirroring HuggingFace models. This ensures compliance with your internal security policies and can improve download speeds.


Wizard Configuration ​

Follow these steps to configure your vLLM deployment via the GPUaaS wizard:

Step 1: Basic Configuration ​

  1. Log in to the platform
  2. Navigate to GPUaaS section
  3. Click Create New Instance

Configure the following settings:

SettingValue
Session Name (your-instance-name)Descriptive instance name
ContainerSee above - vLLM Docker image selection
Docker Args (-e DOCKER_SHM_SIZE=32G)Shared memory size (max 32G)
HTTP Port (8000)vLLM OpenAI API port

Important: DOCKER_SHM_SIZE cannot exceed 32G. Values larger than 32G are not supported and will cause the instance to fail.

Step 2: Queue & Agent Setting ​

Select the appropriate GPU queue based on your model size:

  • For 20B models: 1x_H100_80GB_GPUT2_BC3
  • For 70B+ models: Consider multi-GPU queues or high-memory options

Step 3: Storage Configuration ​

  • Persistent Workspace Path: /ephemeral
  • Recommended for model caching and persistence across instance restarts

Important: /ephemeral will be used for model caching and persistence. HF_HOME is set to /ephemeral/.hf_home by default in the Docker image, so models will be cached there.

Step 4: Setup Script ​

The setup script launches the vLLM OpenAI-compatible API server:

bash
export HF_ENDPOINT="https://<your-artifactory-domain>/artifactory/api/huggingfaceml/huggingface-remote"

vllm serve \
  --model openai/gpt-oss-20b \
  --host 0.0.0.0 \
  --port 8000 \
  --tensor-parallel-size 1 \
  --reasoning-parser openai_gptoss &

Parameter Explanations:

ParameterValue
--model (openai/gpt-oss-20b)HuggingFace model identifier
--host (0.0.0.0)Required for external access
--port (8000)Must match HTTP port configuration
--tensor-parallel-size (1)Number of GPUs (increase for large models)
--reasoning-parser (openai_gptoss)For reasoning models (e.g., GPT-OSS)

Important: The & at the end of the script is required to run the vLLM server in the background. This is essential for the proper startup of the application.

Additional vLLM Parameters (optional):

bash
--max-model-len 8192          # Maximum context length
--gpu-memory-utilization 0.9  # GPU memory utilization
--max-num-seqs 256            # Maximum concurrent sequences
--quantization fp8            # Quantization for supported models

For a complete list of vLLM serving parameters and their descriptions, see the vLLM documentation.

Wizard Config

Choosing Between GPUaaS and Containerized Application Launcher ​

Both GPUaaS and Containerized Application Launcher enable running containerized workloads on GPU infrastructure, but they serve different purposes and operational models.

When to Use GPUaaS ​

GPUaaS is designed for development, experimentation, and interactive workloads. GPUaaS should be used when the following capabilities are required:

  • SSH Access: Direct shell access to the container for real-time debugging, configuration, and monitoring
  • Interactive Development: Ability to modify code, install packages, and adjust configurations while the workload is running
  • Experimentation: Flexibility to test different approaches, models, and parameters without redeploying
  • Research & Development: Exploratory work requiring hands-on control over the environment
  • Custom Setup Scripts: Execute complex initialization logic via the setup script mechanism

When to Use Containerized Application Launcher ​

Containerized Application Launcher is designed for production workloads, web services, and automated deployments. Containerized Application Launcher should be used when the following capabilities are required:

  • Web-Based Services: Deploy APIs, web applications, and microservices with automated HTTPS routing
  • Production-Ready Deployments: Stable, repeatable deployments with minimal manual intervention
  • Observability & Logging: Built-in dashboards for metrics (CPU, GPU, memory, latency, request counts)
  • Automated Network Routing: Pre-configured TCP or HTTPS endpoints without manual SSH tunneling
  • Environment Configuration: Declarative setup via environment variables and configuration files
  • Session Persistence: Restore previous session states when relaunching instances

Comparison Table ​

FeatureComparison
Access MethodGPUaaS: SSH
Containerized App Launcher: HTTPS / TCP / None
Interactive ControlGPUaaS: Full shell access
Containerized App Launcher: No direct shell access
Best ForGPUaaS: Development & experimentation
Containerized App Launcher: Production & automated services
MonitoringGPUaaS: Basic resource dashboards
Containerized App Launcher: Comprehensive metrics & logging
Environment ConfigGPUaaS: Setup script
Containerized App Launcher: Environment variables & config files
AI Application GatewayGPUaaS: Requires manual Step 4 (ClearML SDK script)
Containerized App Launcher: Fully automated via wizard selection

AI Application Gateway Setup (Load Balancing & Authentication) ​

Expose internal GPUaaS vLLM services via a static endpoint with optional load balancing and token-based authentication.

Prerequisites ​

  • Task ID of the instance

Step 1: Create Application Gateway ​

  1. Navigate to Settings → Application Gateway → Static Routes
  2. Click Create Route
  3. Configure route settings:
    • Route Name: route (descriptive name)
    • Target Type: Internal service
    • Authentication: Enable for token-based auth

Step 2: Enable Load Balancing (Optional) ​

After creating the static route:

  1. Toggle Load Balancing ON for the route
  2. This enables linking multiple GPUaaS instances to the same route
  3. Traffic will be distributed across all linked instances

Benefits:

  • High availability
  • Horizontal scaling
  • Zero-downtime updates (spin up new instance, link to route, remove old instance)

Route Config

WARNING

Known Limitation: Currently, only static routes of type path are supported. Routes of type subdomain are not working at this time.

Step 3: Generate Authentication Token ​

If authentication is enabled:

  1. Navigate to Settings → Workspace
  2. Click Generate Token
  3. Copy and securely store the token
  4. Include token in API requests: Authorization: Bearer <TOKEN>

Note: Authentication tokens have a maximum expiration limit of 30 days. Plan to regenerate your token before it expires to avoid service interruptions.

Token Config

Step 4: Expose Service via ClearML SDK ​

Create a Python script to request the external endpoint:

python
from clearml import Task
import json

# Get the running task
t = Task.get_task("<TASK_ID>")

# Request external endpoint
endpoint = t.request_external_endpoint(
    8000,                      # Port of vLLM service
    protocol="http", 
    wait=True,                 # Wait for endpoint to be ready
    static_route="route"  # Route name from Step 1
)

# Validate and display setup
print(json.dumps(t._get_runtime_properties(), indent=4))
print(f"External endpoint: {endpoint}")

Parameters:

  • <TASK_ID>: GPUaaS instance task ID (from instance details)
  • 8000: vLLM OpenAI API port (must match wizard HTTP port)
  • "route": Static route name created in Step 1