Skip to content

Commit 228b7b5

Browse files
committed
Update image builder doc for v2
Signed-off-by: Haytham Abuelfutuh <[email protected]>
1 parent 9dfaa99 commit 228b7b5

File tree

1 file changed

+23
-27
lines changed

1 file changed

+23
-27
lines changed

content/deployment/configuration/image-builder.md

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,28 @@ variants: -flyte -serverless -byoc +selfmanaged
66

77
# Image Builder
88

9-
Union Image Builder supports the ability to build container images within the dataplane. Subsequently enabling the use of the `union` builder type within defined [ImageSpecs](../../user-guide/development-cycle/image-spec.md).
9+
Union Image Builder supports the ability to build container images within the dataplane. Subsequently enabling the use of the `remote` builder type for any defined [Container Image](../../user-guide/task-configuration/container-images.md).
1010

11+
Configure the use of remote image builder:
12+
```bash
13+
flyte create config --builder=remote --endpoint...
14+
```
15+
16+
Write custom [container images](../../user-guide/task-configuration/container-images.md):
1117
```python
12-
image_spec = union.ImageSpec(
13-
builder="union",
14-
name="say-hello-image",
18+
env = flyte.TaskEnvironment(
19+
name="hello_v2",
20+
image=flyte.Image.from_debian_base()
21+
.clone(registry="<my registry url>", name="private", registry_secret="GTEngHabu")
22+
.with_pip_packages("<package 1>", "<package 2>")
1523
)
1624
```
1725

18-
> By default, Image Builder is disabled.
26+
> By default, Image Builder is disabled. And has to be enabled by configuring the builder type to `remote` in flyte config
1927
2028
## Requirements
2129

22-
* Union requires that a `production` domain exists. The image building process runs in the `system` project by default.
30+
* The image building process runs in the target run's project and domain. Any image push secrets needed to push images to the registry will need to be accessible from the project & domain where the build happens.
2331

2432
## Configuration
2533

@@ -220,10 +228,9 @@ echo -n "your-username:your-token" | base64
220228
```json
221229
{
222230
"auths": {
223-
224-
"ghcr.io": {
225-
"auth": "<YOUR_ENCODED_TOKEN>",
226-
}
231+
"ghcr.io": {
232+
"auth": "<YOUR_ENCODED_TOKEN>",
233+
}
227234
}
228235
}
229236

@@ -235,25 +242,14 @@ union create secret --type image-pull-secret --value-file <YOUR_JSON_CONFIG_FILE
235242
```
236243
> This secret will be available to all projects and domains in your tenant. If you want to scope it down add --project and --domain. [Learn more about Union Secrets](../../user-guide/development-cycle/managing-secrets.md)
237244
238-
4. Reference this secret in the ImageSpec object:
245+
4. Reference this secret in the Image object:
239246

240247
```python
241-
image = ImageSpec(
242-
builder="union",
243-
name="private-image"
244-
packages=["union"],
245-
builder_options={
246-
"imagepull_secret_name": "<YOUR_SECRET_NAME>",
247-
}
248+
env = flyte.TaskEnvironment(
249+
name="hello_v2",
250+
image=flyte.Image.from_debian_base()
251+
.clone(registry="<my registry url>", name="private", registry_secret="GTEngHabu")
252+
.with_pip_packages("<package 1>", "<package 2>")
248253
)
249-
250254
```
251255
This will enable Image Builder to push images and layers to a private GHCR.
252-
253-
5. Request the secret so the task can pull the image:
254-
255-
```python
256-
@task(container_image=image, secret_requests=[union.Secret(key="<YOUR_SECRET_NAME>")])
257-
def my_task() -> int:
258-
...
259-
```

0 commit comments

Comments
 (0)