submit_job
Submit a GPU workload and receive an immediate job ID. Supports environment variables and asynchronous execution for inference, training, fine-tuning, or batch jobs.
Instructions
Submit a GPU workload to Jungle Grid. Returns a job_id immediately — the job runs asynchronously. Supports environment variables for runtime configuration or env-backed code payloads when the command would be too long. After submitting, prefer stream_job_logs for real-time output, then use get_job or get_job_logs for final status and logs. Managed jobs automatically upload regular files written under /workspace/artifacts as Jungle Grid artifacts. Use estimate_job first if you want a cost estimate before committing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Optional readable job name. A name is generated if omitted. | |
| workload_type | Yes | Type of GPU workload. | |
| image | Yes | Docker image to run (e.g. 'pytorch/pytorch:2.2.0-cuda12.1-cudnn8-runtime'). | |
| command | Yes | Container entrypoint arguments (e.g. ['python', 'train.py', '--epochs', '10']). | |
| model_size_gb | No | Approximate model size in GB. Used to select the right GPU tier for inference jobs. | |
| disk_gb | No | Optional managed-provider local disk override in GB. Leave unset to let Jungle Grid auto-size from model_size_gb. | |
| optimize_for | No | Scheduling optimization goal. 'speed' prioritises latency; 'cost' minimises spend. | |
| latency_priority | No | Latency sensitivity. Use 'high' for real-time inference. | |
| cost_priority | No | Cost sensitivity. | |
| gpu_type | No | Optional exact GPU override. | |
| gpu_class | No | Optional soft GPU class preference. | |
| region_preference | No | Optional preferred region such as us-east or eu-west. | |
| region_mode | No | Region preference mode. | |
| environment | No | Environment variables injected into the container. Use this for large inline scripts such as CODE when you want to keep the command array short. | |
| huggingface_credential_id | No | Optional saved Hugging Face credential to inject into the managed runtime. Falls back to your account default when omitted. | |
| webhook_url | No | Optional HTTPS URL to receive signed lifecycle event callbacks. |