Faheem Khan
07/31/2022, 3:39 AMprefect deployment build flows/hello.py:hello --name docker-custom --tag dev -sb s3/dev -ib docker-container/docker-custom-image
how do I expose the Port`8787` on docker-custom-image. I have configured volumes, networks on Docker Container block but didn't find any option about ports. I want to access Dask dashboard when I run flows from UI which spin up a separate container of my docker-custom-image.Ahmed Ezzat
07/31/2022, 4:22 AMBharath Ballamudi
07/31/2022, 8:38 AMOmar Sultan
07/31/2022, 10:52 AMBen Muller
07/31/2022, 11:20 AMprojects
in prefect 1.0, in prefect 2.0. Is that something that exists and I'm just missing it? I see workspaces but that's a different paradigm..haris khan
07/31/2022, 2:30 PMBen
07/31/2022, 3:41 PMMarius Haberstock
07/31/2022, 3:56 PMHafsa Junaid
07/31/2022, 4:02 PM@task(log_stdout=True, result=LocalResult())
def hello_world():
text = f"hello to {FLOW_NAME}"
print(text)
return text
from prefect.agent.local import LocalAgent
from prefect.run_configs import LocalRun
with Flow(
FLOW_NAME, storage=STORAGE, run_config=LocalRun(labels=["xyz"])
) as flow:
data = hello_world()
LocalAgent(labels=["xyz"]).start()
Omar Sultan
07/31/2022, 4:43 PMKevin Grismore
07/31/2022, 5:07 PMwait_for
the other tasks, they are still visualized as happening concurrently, which makes the visual less fun.Marius Haberstock
07/31/2022, 7:04 PMdocker run --platform linux/amd64 -ti -p 4200:4200 --expose=4200 prefecthq/prefect:2.0.1-python3.9
Once my container is ready, I execute prefect orion start
inside of it
I see the in the logs that the server successfully started, however I don’t get a connection when I open http://localhost:4200 in my browser.Slackbot
07/31/2022, 7:24 PMJai P
07/31/2022, 8:28 PMHafsa Junaid
07/31/2022, 8:49 PMHafsa Junaid
07/31/2022, 8:53 PMERROR
agent
HTTPSConnectionPool(host='34.66.191.39', port=443): Max retries exceeded with url: /apis/batch/v1/namespaces/default/jobs (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f70cc17afd0>: Failed to establish a new connection: [Errno 111] Connection refused'))
Bertangela Loret de Mola
07/31/2022, 9:54 PMJack Sundberg
07/31/2022, 11:23 PMdeployment = Deployment(
name="example-deploy",
flow=my_flow_object, # defined elsewhere
packager=OrionPackager(serializer=PickleSerializer()),
tags=[
"some-tag1",
"some-tag2",
],
)
deployment_id = await deployment.create()
But this code is now broken and the docs recommend sticking to yaml files. How would I go about updating this? Can we still specify a packager
and is it possible to create a deployment in python without creating a yaml file?Jenia Varavva
08/01/2022, 1:16 AMSettings
values? E.g. I want to set PREFECT_API_URL
from inside the python script?Charles C
08/01/2022, 3:10 AM2.0.1~/workspace/prefect ❱ prefect deployment create example.py
Usage: prefect deployment [OPTIONS] COMMAND [ARGS]...
Try 'prefect deployment --help' for help.
╭─ Error ──────────────────────────────────────────
│ No such command 'create'.
╰──────────────────────────────────────────────────
Jenia Varavva
08/01/2022, 6:12 AMJenia Varavva
08/01/2022, 6:25 AMAnat Tal Gagnon
08/01/2022, 7:42 AMroot@24dc674d1f7d:/flows# cat flow1.py
from prefect import flow
@flow
def my_favorite_function():
print("What is your favorite number?")
return 42
print(my_favorite_function())
Beizhen
08/01/2022, 7:47 AM14:25:23 INFO Submitted for execution: Job prefect-job-2444a873
14:25:49 ERROR Failed to load and execute flow run: ConnectionError(MaxRetryError("HTTPSConnectionPool(host='<http://www.scorpiotankers.com|www.scorpiotankers.com>', port=443): Max retries exceeded with url: /our-fleet/ (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7efdbc010d00>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))"))
14:26:00 INFO Beginning Flow run for 'Destination Predict'
14:26:00 DEBUG Using executor type LocalDaskExecutor
14:26:00 INFO Flow run has already finished.
14:26:32 ERROR k8s-infra Pod prefect-job-2444a873-8887r failed.
Container 'flow' state: terminated
Exit Code:: 1
Reason: Error
The specific error seems to reflect code from another unrelated flow. Any idea how one flow can throw an error in several other completely unrelated flows? before even the flow starts?Toby Rahloff
08/01/2022, 8:09 AMOscar Björhn
08/01/2022, 8:50 AMMarius Haberstock
08/01/2022, 9:19 AMlog_to_stdout
Parameter which automatically logs all print statements. Is there something similar for Prefect 2?Martin T
08/01/2022, 9:42 AMMohamed Alaa
08/01/2022, 10:41 AMflow.visuallize()
And also im really loving prefect and cannot wait to start working with it and exploring
Thanks alotPierre Monico
08/01/2022, 11:01 AM