vk
10/17/2022, 1:02 PMflow.storage = Module('samples.flow_orion')
Now i’m kind of forced to specify exact full filename, even though I have file in python path.
That’s very inconvenient for cases when developers have no control over the final image layout.
That’s how I create deployments now:
entrypoint = 'samples.flow_orion:entrypoint' # this is just module, available on path
flow = prefect.utilities.importtools.import_object(entrypoint)
# here is path/entrypoint i need to specify path. could I use module name instead?
deployment = Deployment.build_from_flow(
name=flow.name,
flow=flow,
work_queue_name="kubernetes",
skip_upload=True,
infrastructure=KubernetesJob(
image=image,
namespace='prefect2',
job=k8s_template_orion(flow)
),
path='/app/lib/python3.9/site-packages/samples/', # TODO
entrypoint='flow_orion.py:entrypoint'
)
deployment.apply()
Did i miss how to use module name instead of path?Anna Geller
vk
10/17/2022, 2:55 PMAnna Geller