CI/CD with clore-ai SDK
Integrate GPU testing and deployment into your CI/CD pipelines. This chapter covers GitHub Actions, GitLab CI, Docker, and secrets management — with full working configs.
Secrets Management
Before configuring any pipeline, store your Clore API key securely.
GitHub Actions
Go to your repo → Settings → Secrets and variables → Actions
Click New repository secret
Name:
CLORE_API_KEY, Value: your API key
GitLab CI
Go to your project → Settings → CI/CD → Variables
Add variable: Key =
CLORE_API_KEY, Value = your API keyCheck Mask variable and Protect variable
General Rules
Never hardcode API keys in source code or CI configs
Use environment variables or secrets managers
Rotate keys periodically
Restrict key scope: use a dedicated API key for CI (not your main account key)
GitHub Actions
Basic: GPU Smoke Test
Run nvidia-smi on a Clore GPU on every push to main.
Advanced: Matrix GPU Testing
Test your code on multiple GPU types in parallel.
Supporting script ci/run_gpu_test.py:
GitLab CI
Basic Pipeline
Parallel GPU Jobs
Docker
SDK Script Container
Package your SDK automation scripts in a Docker image.
Docker Compose for Local Development
Run:
Multi-Stage Build for Production
Cleanup & Safety
Always Cancel Orders in CI
Every CI job must cancel its orders in a finally block or a post-job step:
Budget Guard for CI
Prevent runaway CI costs:
Use it as a pre-step:
See Also
SDK API Reference — complete method documentation
SDK Quick Start — getting started tutorial
Automation Recipes — auto-scaler, spot bot, training pipeline
Auto-Provisioning from GitHub Actions — existing GitHub Actions guide
Last updated
Was this helpful?