CosmicAC Logo

Creating Jobs in CosmicAC

Create inference and other job types in CosmicAC using the hp-rpc-cli command-line tool.

Creating Jobs in CosmicAC


Example: Create Inference Job

npx hp-rpc-cli -s <RPC_PUBLIC_KEY_OF_WRK_ORK> -m createJob -d '{
  "gpu": {
    "count": 1,
    "type": "GA106_RTX_A2000_12GB"
  },
  "location": "IN",
  "userId": 1,
  "name": "new-inference-job",
  "tags": ["inference"],
  "type": "INFERENCE_VLLM",
  "params": {
    "docker_image": "abhi07/cosmicac-wrk-agent-inference:latest",
    "image_pull_policy": "Always",
    "namespace": "default",
    "config_debug": "1",
    "model_name": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
    "model_source": "huggingface",
    "agent_topic": "@cosmicac/agent-inference",
    "is_managed_inference": "true",
    "handshake_secret": "secret",
    "crypto_key": "a1234567890b1234567890c1234567890",
    "crypto_algo": "hmac-sha384",
    "vllm_startup_timeout_ms": "300000",
    "node_env": "development",
    "swap_space": "0",
    "dtype": "float16",
    "enforce_eager": "true",
    "env": [
      {
        "name": "HF_TOKEN",
        "valueFrom": {
          "secretKeyRef": {
            "name": "hf-token-secret",
            "key": "HF_TOKEN"
          }
        }
      }
    ],
    "cpu_limit": "4",
    "memory_limit": "4Gi",
    "cpu_request": "2",
    "memory_request": "4Gi"
  }
}' -t 100000

On this page