Skip to content

Commit b74c61a

Browse files
committed
clean up imagespec declarations
Signed-off-by: Peeter Piegaze <1153481+ppiegaze@users.noreply.github.com>
1 parent 03b2b99 commit b74c61a

File tree

2 files changed

+12
-34
lines changed
  • union-hello-world/{{cookiecutter.project_name}}/workflows
  • union-standard/{{cookiecutter.project_name}}/src/tasks

2 files changed

+12
-34
lines changed

union-hello-world/{{cookiecutter.project_name}}/workflows/hello-world.py

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,14 @@
22

33
image_spec = union.ImageSpec(
44

5-
# The name of the image.
6-
name="hello-world-image",
5+
# Build the image using Union's built-in cloud builder (not locally on your machine)
6+
builder="union",
77

8-
# Use the `uv.lock` file in this project to define the dependencies included in the image.
9-
requirements="uv.lock",
8+
# The name of the image.
9+
name="union-hello-world-image",
1010

11-
# The container registry to which the image will be pushed.
12-
# Only used for Union BYOC. Not used for Union Serverless
13-
# Uncomment this parameter if you are using Union BYOC.:
14-
#
15-
# * Substitute the actual name of the registry for <my-registry>.
16-
# (for example if you are using GitHub's GHCR, you would use "ghcr.io/<my-github-org>").
17-
#
18-
# * Make sure you have Docker installed locally and are logged into that registry.
19-
#
20-
# * Make sure that the image, once pushed to the registry, is accessible to Union
21-
# (for example, for GHCR, make sure the image is public).
22-
#
23-
# registry="<my-registry>"
11+
# List of packages to install on the image
12+
packages=-["union"],
2413
)
2514

2615
@union.task(container_image=image_spec)

union-standard/{{cookiecutter.project_name}}/src/tasks/tasks.py

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,14 @@
44

55
image_spec = union.ImageSpec(
66

7-
# The name of the image.
8-
name="standard-image",
7+
# Build the image using Union's built-in cloud builder (not locally on your machine)
8+
builder="union",
99

10-
# Use the `uv.lock` file in this project to define the dependencies included in the image.
11-
requirements="uv.lock",
10+
# The name of the image.
11+
name="union-standard-image",
1212

13-
# The container registry to which the image will be pushed.
14-
# Only used for Union BYOC. Not used for Union Serverless
15-
# Uncomment this parameter if you are using Union BYOC.:
16-
#
17-
# * Substitute the actual name of the registry for <my-registry>.
18-
# (for example if you are using GitHub's GHCR, you would use "ghcr.io/<my-github-org>").
19-
#
20-
# * Make sure you have Docker installed locally and are logged into that registry.
21-
#
22-
# * Make sure that the image, once pushed to the registry, is accessible to Union
23-
# (for example, for GHCR, make sure the image is public).
24-
#
25-
# registry="<my-registry>"
13+
# List of packages to install on the image
14+
packages=-["union"],
2615
)
2716

2817
@union.task(container_image=image_spec)

0 commit comments

Comments
 (0)