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

  1. Go to your repo → Settings → Secrets and variables → Actions

  2. Click New repository secret

  3. Name: CLORE_API_KEY, Value: your API key

GitLab CI

  1. Go to your project → Settings → CI/CD → Variables

  2. Add variable: Key = CLORE_API_KEY, Value = your API key

  3. Check 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

Last updated

Was this helpful?