Skip to content

Commit

Permalink
clean up imagespec declarations
Browse files Browse the repository at this point in the history
Signed-off-by: Peeter Piegaze <[email protected]>
  • Loading branch information
ppiegaze committed Jan 21, 2025
1 parent 03b2b99 commit b74c61a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,14 @@

image_spec = union.ImageSpec(

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

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

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

@union.task(container_image=image_spec)
Expand Down
23 changes: 6 additions & 17 deletions union-standard/{{cookiecutter.project_name}}/src/tasks/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,14 @@

image_spec = union.ImageSpec(

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

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

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

@union.task(container_image=image_spec)
Expand Down

0 comments on commit b74c61a

Please sign in to comment.