Andrew
05/22/2024, 2:51 PMRunLLM
05/22/2024, 2:51 PMImageSpec
with rebuild_always=True
, Flyte will rebuild the image every time regardless of changes. Additionally, if the task versioning does not consider changes in the container image, it might trigger unnecessary rebuilds.
Would you like more details on how to manage image caching and versioning in Flyte?
Sources:
- Flyte Community Discussion
- Flyte Community Discussion
- Flyte Package and Register Documentation π 0 button π 0 button π‘ Hint: Mention @runllm in the thread for followups.Kevin Su
05/22/2024, 2:52 PMAndrew
05/22/2024, 2:53 PMpyflyte register /path/to/pipeline.py
with project and domainKevin Su
05/22/2024, 2:54 PMAndrew
05/22/2024, 2:55 PMKevin Su
05/22/2024, 2:55 PMKevin Su
05/22/2024, 2:55 PMAndrew
05/22/2024, 2:57 PMDEFAULTS = [
DOTENV,
GCS,
BIGQUERY,
SECRETS,
DB_DTYPES,
PENDULUM,
PSUTIL,
TQDM,
YAML,
TYPEGUARD,
ML_ULTRA_CLIENT,
OPENCV_HEADLESS,
POLARS,
]
default_image_spec = ImageSpec(
name="default",
base_image="<http://ghcr.io/flyteorg/flytekit:py3.10-1.10.2|ghcr.io/flyteorg/flytekit:py3.10-1.10.2>",
packages=[*DEFAULTS],
apt_packages=["git"],
registry=DAI_ML_PIPELINES_REGISTRY,
)
Kevin Su
05/22/2024, 2:59 PMKevin Su
05/22/2024, 3:02 PM(flytekit-3.10) β flytekit git:(master) β pyflyte run --remote flyte-example/improve_image_spec.py wf
Running Execution on Remote.
[2024-05-22T23:01:23.821+0800] {authenticator.py:249} INFO - Retrieved new token, expires in 86400
Image pingsutw/flytekit:DPW01P0tkuBYhsCIdr9fBA found. Skip building.
Andrew
05/22/2024, 3:03 PMAndrew
05/22/2024, 3:07 PMKevin Su
05/22/2024, 3:09 PMKevin Su
05/22/2024, 3:09 PMAndrew
05/22/2024, 3:14 PMKevin Su
05/22/2024, 3:14 PMAndrew
05/22/2024, 3:15 PM1.10.2
Andrew
05/22/2024, 3:15 PMKevin Su
05/22/2024, 3:16 PMKevin Su
05/22/2024, 3:16 PMAndrew
05/22/2024, 3:17 PMAndrew
05/22/2024, 3:27 PMKevin Su
05/22/2024, 3:28 PM*DEFAULTS
?
packages=[*DEFAULTS]
instead of
packages=DEFAULTS
Andrew
05/22/2024, 3:29 PMAndrew
05/22/2024, 4:46 PMCould not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
Kevin Su
05/22/2024, 4:57 PMThomas Fan
05/22/2024, 5:13 PMKevin Su
05/22/2024, 5:13 PMAndrew
05/22/2024, 5:13 PMKevin Su
05/22/2024, 5:15 PMdocker stop flyte-sandbox
to remove the envd buildkit daemonKevin Su
05/22/2024, 5:16 PMThomas Fan
05/22/2024, 5:19 PMdocker builder prune
to remove the build cache?Andrew
05/22/2024, 5:20 PMAndrew
05/22/2024, 5:38 PMThomas Fan
05/22/2024, 5:53 PMpip install imagespec-fast-builder==0.0.17
Andrew
05/22/2024, 6:00 PM0.327 Reading package lists...
0.919 E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
0.919 E: Unable to lock directory /var/lib/apt/lists/
ERROR: failed to solve: process "/bin/sh -c apt-get update && apt-get install -y --no-install-recommends ca-certificates" did not complete successfully: exit code: 100
Kevin Su
05/22/2024, 6:02 PMThomas Fan
05/22/2024, 6:13 PMAndrew
05/22/2024, 6:14 PMAndrew
05/22/2024, 6:18 PMThomas Fan
05/22/2024, 7:02 PMflytekit
into DEFAULT
? (It'll use debian:bookworm-slim
, which ends up to be a smaller image during runtime)
default_image_spec = ImageSpec(
name="default",
packages=DEFAULTS,
apt_packages=["git"],
registry=DAI_ML_PIPELINES_REGISTRY,
)
I also released one more fix: pip install imagespec-fast-builder==0.0.19
.Andrew
05/22/2024, 8:15 PMAndrew
05/22/2024, 8:32 PMThomas Fan
05/22/2024, 8:58 PMDEFAULTS
? I'm doing some bigger improvements to my image builder and I want to make sure it works for you.Andrew
05/22/2024, 9:02 PM['python-dotenv==1.0.1', 'google-cloud-storage==2.15.0', 'google-cloud-bigquery==3.13.0', 'google-cloud-secret-manager==2.17.0', 'db-dtypes==1.1.1', 'pendulum==2.1.2', 'psutil==5.9.5', 'tqdm==4.65.0', 'pyyaml==5.3.1', 'typeguard==4.1.5', 'opencv-python-headless==4.7.0.72', 'polars==0.18.13']
I'm also still building some things. I got that failure again, but it was a different image, so I'm making sure I have them all setup right for the fast builder