Skip to main content

Build an image and retrieve an artifact

This guide follows one complete workflow: uplink source, build an image, run that image, write a result to /data, and downlink the result.

The files are under docs/examples/build-storage/. Run these commands from the repository root in an interactive omnicloud-cli session.

1. Inspect storage​

Confirm that the default volume is available:

The CLI's volume details and capacity summary examples show where to read readiness and limits; the sample named volume is results.

dphi> storage list
dphi> storage get default
dphi> storage summary

This example omits mounts, preserving default at /data. A Bound volume can still have file accessPhase Pending, Failed, or Ready; check for Ready before uplinking. Requested capacity is not a hard byte cap or actual file usage. Summary active totals/counts exclude terminating volumes, but quota includes their requested capacity until removal.

For create NAME SIZE, paginated list --limit/--cursor, and delete NAME --yes, follow the named mount walkthrough. Deletion is asynchronously accepted, permanent, has no platform backups or recovery, and may interrupt transfers. default, external ownership, running workloads, and current Workload Definition references are protected. See the volatile-environment guidance.

Uplink the Dockerfile and application into one remote directory:

dphi> storage uplink default docs/examples/build-storage/Dockerfile builds/demo/Dockerfile
dphi> storage uplink default docs/examples/build-storage/app.py builds/demo/app.py
dphi> storage files default builds/demo

3. Start the image build​

The included build request points at those uplinked paths:

dphi> build create docs/examples/build-storage/image-build.yaml --idempotency-key demo-image-v1
╭──────────────────── OmniCloud ────────────────────╮
│ Build 01K9A000000000000000000002: Pending │
│ Image: registry.dphi.space/tenant-a/demo/hello:v1 │
│ Accepted: 2026-11-04T10:00:00Z │
│ Idempotency key: demo-image-v1 │
╰───────────────────────────────────────────────────╯
dphi> build wait 01K9A000000000000000000002

If the build fails, inspect it before continuing:

dphi> build get 01K9A000000000000000000002
dphi> build logs 01K9A000000000000000000002

A successful build reports an image reference and immutable digest:

dphi> build get 01K9A000000000000000000002
╭─────────────────────────────────── OmniCloud ───────────────────────────────────╮
│ Build 01K9A000000000000000000002: Succeeded │
│ Image: registry.dphi.space/tenant-a/demo/hello:v1 │
│ Accepted: 2026-11-04T10:00:00Z │
│ Digest: sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa │
╰─────────────────────────────────────────────────────────────────────────────────╯

You can also list the published image:

dphi> image list --repository demo/hello
dphi> image list --repository demo/hello
Tenant Registry Images
┏━━━━━━━━━━━━┳━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓
┃ Repository ┃ Tag ┃ Digest ┃ Size ┃ Pushed At ┃
┡━━━━━━━━━━━━╇━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩
│ demo/hello │ v1 │ sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa │ 1048576 │ 2026-11-05T10:00:00Z │
└────────────┴─────┴─────────────────────────────────────────────────────────────────────────┴─────────┴──────────────────────┘

The build manifest uses the tenant-relative repository demo/hello. OmniCloud prepends the registry host and your Tenant ID when it publishes the image. For example, a build for tenant-a reports:

registry.dphi.space/tenant-a/demo/hello:v1

The image list --repository filter remains tenant-relative, so use demo/hello there rather than the fully qualified reference.

4. Put the image in the workload​

The included workload is configured with the example tenant tenant-a:

spec:
components:
- name: artifact-demo
mode: job
image: registry.dphi.space/tenant-a/demo/hello:v1

Open docs/examples/build-storage/workload.yaml and replace its complete image value with the image field returned by your successful build. This is important even when the repository and tag are unchanged, because your Tenant ID is part of the published image path.

After changing sources, wait for a new Image Build to succeed before submitting a new Run. You can reuse the same tag: new workload containers resolve it through the registry on every start, including restarts. Registry availability is required; cached layers may still be reused after resolution. Moving a tag does not restart running containers. Use repository@sha256:... with the successful build's digest when you need a fixed image identity across starts.

Existing native Jobs and Deployments created before this freshness fix retain their previous pull policy after an upgrade. Submit a new Run to use the fix.

5. Run the image​

dphi> run create docs/examples/build-storage/workload.yaml --idempotency-key demo-run-v1
dphi> run wait YOUR_RUN_ID
dphi> run logs YOUR_RUN_ID
CPU-only example: the NVIDIA startup warning is expected

This workload intentionally omits gpuRequest and runs without GPU access. The PyTorch base image includes GPU software, but choosing that image does not request a GPU. Its startup checks may print:

WARNING: The NVIDIA Driver was not detected. GPU functionality will not be available.

This example only writes a text file and does not need a GPU. Keep the workload CPU-only; check that the Run reaches Succeeded and retrieve its output below. For a GPU application, request gpuRequest: true on the workload component and verify CUDA access, as shown in the GPU guide.

The application creates /data/results/build-demo.txt. Wait for Succeeded before treating it as final output.

dphi> storage files default results
dphi> storage downlink default results/build-demo.txt ./build-demo.txt

The stored-file tree shows the remote path and size. A completed downlink returns:

dphi> storage downlink default results/build-demo.txt ./build-demo.txt
╭──────────────── OmniCloud ────────────────╮
│ { │
│ "operation": "downlink", │
│ "pvc": "default", │
│ "remotePath": "results/build-demo.txt", │
│ "localPath": "./build-demo.txt", │
│ "bytes": 37 │
│ } │
╰───────────────────────────────────────────╯

Open build-demo.txt locally. It should contain:

artifact built and run by OmniCloud

Build safety​

contextPath limits the files visible to the builder. Keep everything copied by the Dockerfile inside that path. The source is not snapshotted, so do not modify it while the build is active.

Never put passwords, tokens, or credentials in build arguments, Dockerfiles, source files, or CLI arguments. Contact software@dphispace.com if a build requires a private dependency.

Dependencies and package caches​

Packaging dependencies into the application image remains the recommended way to make runs repeatable. Local Python/pip and apt package caches support dependency installation during builds. Their contents may currently be empty or incomplete and will be populated alongside users' needs. They do not provide unrestricted internet access or make uncached packages automatically available. Request a missing package, version, or special requirement through software@dphispace.com. No package-cache URL or installation command is required for the current customer workflow.

Thor attempts X-band service during ground-station passes. Downloads can wait between passes or continue across several passes. Safety and scheduled spacecraft Activities take priority. X-band pointing can temporarily interrupt GEO ISL command contact; the CLI's three queues wait independently for their required links. Wait for a transfer to finish before submitting work that depends on its file. DEV mode retains its direct route.