Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 14 additions & 7 deletions packages/prime/src/prime_cli/commands/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
package_build_context,
push_bulk,
)
from .images_transfer_bulk import transfer_bulk

app = PlainTyper(help="Manage Docker images in Prime Intellect registry", no_args_is_help=True)
console = get_console()
Expand Down Expand Up @@ -428,9 +429,6 @@ def push_image(
if platform_image and private:
console.print("[red]Error: Platform images must be public[/red]")
raise typer.Exit(1)
if platform_image and config.team_id:
console.print("[red]Error: Platform images cannot be pushed in a team context[/red]")
raise typer.Exit(1)
if not is_transfer and image_reference is None:
console.print(
"[red]Error: Image reference is required unless --source-image is used[/red]"
Expand Down Expand Up @@ -483,7 +481,9 @@ def push_image(
console.print(f"[bold]Destination:[/bold] {destination_display}")
if platform_image:
console.print("[bold]Owner:[/bold] Platform")
if config.team_id:
if config.team_id:
console.print("[dim]Team context ignored: platform images are org-less[/dim]")
elif config.team_id:
console.print(f"[dim]Team: {config.team_id}[/dim]")
console.print()

Expand All @@ -502,7 +502,7 @@ def push_image(
image_name=image_name,
image_tag=image_tag,
platform=platform,
team_id=config.team_id or None,
team_id=None if platform_image else (config.team_id or None),
visibility=visibility,
owner_scope="platform" if platform_image else None,
)
Expand Down Expand Up @@ -581,7 +581,10 @@ def push_image(
console.print(
f"[bold blue]Building and pushing image:[/bold blue] {image_name}:{image_tag}"
)
if config.team_id:
if platform_image:
if config.team_id:
console.print("[dim]Team context ignored: platform images are org-less[/dim]")
elif config.team_id:
console.print(f"[dim]Team: {config.team_id}[/dim]")
console.print()

Expand Down Expand Up @@ -625,7 +628,7 @@ def push_image(
"dockerfile_path": PACKAGED_DOCKERFILE_PATH,
"platform": platform,
}
if config.team_id:
if config.team_id and not platform_image:
build_payload["team_id"] = config.team_id
if platform_image:
build_payload["owner_scope"] = "platform"
Expand Down Expand Up @@ -740,6 +743,10 @@ def push_image(
# Bulk push (JSONL manifest / Harbor task dirs) lives in images_bulk.py.
app.command("push-bulk")(push_bulk)

# Bulk transfer (JSONL manifest / Harbor task dirs / Hugging Face datasets)
# lives in images_transfer_bulk.py.
app.command("transfer-bulk")(transfer_bulk)


@app.command("list", epilog=LIST_IMAGES_JSON_HELP)
def list_images(
Expand Down
Loading
Loading