thankful-tailor-28399
03/21/2024, 9:54 AMthankful-tailor-28399
03/21/2024, 9:54 AMfreezing-airport-6809
freezing-airport-6809
thankful-tailor-28399
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”thankful-tailor-28399
03/21/2024, 3:41 PMtall-lock-23197
pyflyte register --non-fast
. if you're using ImageSpec
, you can copy the code into the image by specifying source_root
thankful-tailor-28399
03/22/2024, 8:13 AMthankful-tailor-28399
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?tall-lock-23197
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.
thankful-tailor-28399
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 workflowstall-lock-23197
tall-lock-23197
thankful-tailor-28399
03/22/2024, 10:44 AMtall-lock-23197