Skip to content
Socaity Docs

APIPod CLI Reference

APIPod CLI is the deployment tool — use it to scan a project, build a Docker container, and start your service. To interact with services from your code or terminal, see the SocaitySDK CLI.

Installation

terminal
pip install apipod

Scan

Inspect your project and generate a deployment configuration. APIPod reads your requirements.txt, detects CUDA/PyTorch/TensorFlow dependencies, and infers the correct base Docker image.

terminal
# Scan the project and generate deployment config
apipod --scan

Build

Generate a Dockerfile and build your container. APIPod selects compatible CUDA/cuDNN versions automatically. Pass a target file to override the default entry point.

terminal
# Build with auto-detected settings
apipod --build

# Specify the target entry-point file
apipod --build ./main.py

Start

Run your service locally. Combine with --compute serverless --provider localhost to enable the in-memory job queue, which emulates serverless GPU behaviour for testing.

terminal
# Start on the default port (8000)
apipod --start

# Start on a custom port
apipod --start --port 9000

# Enable local job queue (emulates serverless GPU)
apipod --start --compute serverless --provider localhost

Deployment Flags

The deployment flags control which runtime backend APIPod selects. They work with both --build and --start.

terminal
# Build for Socaity orchestration
apipod --build --orchestrator socaity

# Build for RunPod serverless
apipod --build --compute serverless --provider runpod

# Start locally with serverless job-queue emulation
apipod --start --compute serverless --provider localhost

Flag Reference

FlagArgumentDescription
--scan(none)Scan project, detect dependencies, and generate deployment config.
--build[FILE]Build Docker container. Optionally specify the target entry-point file (defaults to main.py).
--start(none)Start the service locally.
--orchestratorsocaity | localOrchestration platform. Use "socaity" for Socaity-managed deployment.
--computededicated | serverlessCompute mode. "serverless" enables the job queue; "dedicated" runs a standard FastAPI server.
--providerlocalhost | runpod | autoInfrastructure provider. "localhost" activates in-memory job queue for local testing.
--regionstringTarget deployment region (provider-dependent).
--hoststringHost address to bind to when starting locally (default: 0.0.0.0).
--portintPort to listen on when starting locally (default: 8000).

Orchestrator × Compute × Provider Matrix

The combination of --orchestrator, --compute, and --provider determines which runtime APIPod activates.

--orchestrator--compute--providerRuntime
socaityserverlesslocalhostFastAPI + local job queue (test mode)
socaityserverlessrunpodRunPod serverless router
socaitydedicatedlocalhostFastAPI + local job queue (test mode)
socaitydedicatedautoFastAPI
localserverlesslocalhostFastAPI + local job queue
localserverlessrunpodRunPod serverless router
localdedicatedlocalhostFastAPI