matt_innerspace.io
01/07/2020, 9:05 PMhello_world.py
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 prefect
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 faas-cli push ...
to deploy to the cloud/cluster when you're ready.Zachary Hughes
01/07/2020, 9:37 PMhello_world.py
file containing a hello world flow as an example:
from prefect import task, Flow
@task
def hello_world():
print("Hello world!")
with Flow("Hello") as flow:
hello = hello_world()
You can then import, run, and/or register it the same way you would as if it were in the same script:
from hello_world import flow
flow.run()
flow.register(project_name=YOUR_PROJECT_NAME)
Does that help at all?matt_innerspace.io
01/07/2020, 9:40 PMZachary Hughes
01/07/2020, 9:45 PMflow.run_agent()
As described here:
https://docs.prefect.io/cloud/tutorial/first.html#run-flow-with-prefect-cloudJeremiah
01/08/2020, 12:26 AMEnvironments
- local, docker, etc.)Zachary Hughes
01/08/2020, 2:07 AMmatt_innerspace.io
01/08/2020, 3:42 PMEnvironments
and Storage
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/921f5847af4bd7e5808a0eca61aeb6edChris White
01/08/2020, 4:15 PMDocker(registry_url="innerspace", image_name="a-repo-within-your-dockerhub")
every container registry type interacts with docker’s naming conventions differentlymatt_innerspace.io
01/08/2020, 6:07 PMChris White
01/08/2020, 6:54 PMMarvin
01/08/2020, 6:55 PM