Skip to main content

Getting Started

Requires Docker.

⚡ Install

curl -fsSL https://get.anycloud.sh | sh

For the Python SDK, also install the package:

pip install anycloud-sdk

🔓 Login

anycloud login

Authenticates with GitHub via OAuth. Required for pulling private images from GHCR and identifying your deployments.

🖥️ Start the API

anycloud runs a local API server that orchestrates your deployments. It runs in the background as a Docker container.

anycloud api start

🔑 Add Credentials

Pass credentials for your cloud directly as flags. Your credentials are stored locally and never sent to any external service.

# AWS
anycloud credentials new my-aws --provider aws \
--access-key-id AKIA... --secret-access-key ...

# Azure
anycloud credentials new my-azure --provider azure \
--application-id ... --secret ... \
--subscription-id ... --directory-id ...

# GCP (inline values)
anycloud credentials new my-gcp --provider gcp \
--project-id my-proj --client-email sa@my-proj.iam.gserviceaccount.com \
--private-key "..."

# Lambda Labs
anycloud credentials new my-lambda --provider lambda --api-key ...

Secret values also accept an environment-variable fallback (e.g. AWS_SECRET_ACCESS_KEY, GCP_PRIVATE_KEY, LAMBDA_API_KEY) — the flag wins when both are provided.

On a terminal, skip the flags entirely — anycloud credentials new my-aws (or just anycloud credentials new, which prompts for the name too) launches an interactive wizard. It can:

  • read an existing local profile — an AWS profile from ~/.aws/credentials, or a GCP service-account key / ADC;
  • provision a new least-privilege IAM user / service principal / service account by calling your local aws / az / gcloud CLI;
  • or accept pasted values.

Azure has no "read from local CLI" option — its CLI session is user-auth, not a service-principal secret — so the Azure wizard offers only "generate a new service principal" or "paste an existing one".

🚀 Deploy

import anycloud
from anycloud.types import CloudConfig

@anycloud.function(
image="ghcr.io/acme/my-training:latest",
gpu="h100:all",
cloud_config=CloudConfig(
credentials="my-aws",
spot=True,
input_bucket="training-data",
output_bucket="results",
),
)
def train(learning_rate: float, epochs: int = 100):
import torch
from my_model import MyModel

data = torch.load("/mnt/input/dataset.pt")
model = MyModel()
optimizer = torch.optim.Adam(model.parameters(), lr=learning_rate)
for epoch in range(epochs):
loss = model(data).mean()
loss.backward()
optimizer.step()
torch.save(model.state_dict(), "/mnt/output/model.pt")

job = train.submit(0.001, epochs=50, id="lr-sweep-1e-3")
job.wait()
print(job.logs())

⬆️ Updating

anycloud update
anycloud api stop
anycloud api start