matt_innerspace.io01/07/2020, 9:05 PM
script? Lots of examples of what can happen inside the python script, but i'm missing how it would be deployed as a flow. I can see the flow runs inside a docker container, on an agent. I can see how the
cli tool can run a flow, but it seems the deployment and running are linked somehow? For comparison, i use openfaas python functions which also run in docker containers and are deployed wherever has room to run it, but there is an explicit
to deploy to the cloud/cluster when you're ready.
faas-cli push ...
Zachary Hughes01/07/2020, 9:37 PM
file containing a hello world flow as an example:
You can then import, run, and/or register it the same way you would as if it were in the same script:
from prefect import task, Flow @task def hello_world(): print("Hello world!") with Flow("Hello") as flow: hello = hello_world()
Does that help at all?
from hello_world import flow flow.run() flow.register(project_name=YOUR_PROJECT_NAME)
matt_innerspace.io01/07/2020, 9:40 PM
Zachary Hughes01/07/2020, 9:45 PM
As described here: https://docs.prefect.io/cloud/tutorial/first.html#run-flow-with-prefect-cloud
Jeremiah01/08/2020, 12:26 AM
- local, docker, etc.)
Zachary Hughes01/08/2020, 2:07 AM
matt_innerspace.io01/08/2020, 3:42 PM
is where I'm getting tripped up - storage (local, s3, docker, etc) is where the code is deployed, which wasn't clear to me. I reworked the example above in a gist to deploy to my own docker repo, which still seems to fail... I'm missing something simple here - https://gist.github.com/qmnonic/921f5847af4bd7e5808a0eca61aeb6ed
Chris White01/08/2020, 4:15 PM
every container registry type interacts with docker’s naming conventions differently
matt_innerspace.io01/08/2020, 6:07 PM
Chris White01/08/2020, 6:54 PM