Franco Bocci
03/21/2024, 9:54 AMFranco Bocci
03/21/2024, 9:54 AMKetan (kumare3)
Ketan (kumare3)
Franco Bocci
03/21/2024, 3:41 PMpyflyte register
• pyflyte package
• flytectl register
And in all scenarios the code seems to be separate from the “container image”Franco Bocci
03/21/2024, 3:41 PMSamhita Alla
pyflyte register --non-fast
. if you're using ImageSpec
, you can copy the code into the image by specifying source_root
Franco Bocci
03/22/2024, 8:13 AMFranco Bocci
03/22/2024, 8:23 AMImageSpec
, and I want to build my own images for my workflows. There are two scenarios:
• While developing
• When trying to go to production
I’ll start with the development scenario, and I’ll have my repository with my code defined in something like (this is 100% an example):
|Dockerfile
|pyproject.toml
|poetry.lock
|src/
|- workflows/
|- internal_library/
I would set up somehow a workflow to build and push my image to a docker registry. This image would contain my dependencies and my code (everything in src/
, both Flyte related and non Flyte related). According to this , the next step would be running pyflyte register workflows --image ...
with the image I previously built. But my image had my code already. So when I execute these newly registered workflow, how do I know whether I’m using this or the previous workflows?Samhita Alla
So, there are two ways for this to work?no, you'll need to use registration if you want flyte to use the code available in the image.
pyflyte register
uses fast-registration by default. you could also use pyflyte package
and flytectl register
commands.
So when I execute these newly registered workflow, how do I know whether I’m using this or the previous workflows?you'll need to rebuild the image every time you modify your code. for that reason, fast registration is preferred over registration while developing workflows.
Franco Bocci
03/22/2024, 9:47 AMfast-register
, what happens? Because I’d be registering the local version of the workflows, on top of an image which would contain a previous version of those workflowsSamhita Alla
Samhita Alla
Franco Bocci
03/22/2024, 10:44 AMSamhita Alla