Hi there! Firstly, I'm sorry if this is a repeated...
# prefect-server
b
Hi there! Firstly, I'm sorry if this is a repeated question, but I have been banging my head against a wall for some time now. We have Prefect Server deployed to a machine on our company cluster using docker. I have a flow (example.py) that runs on the same machine happily by running Prefect locally. I can start an agent in the directory of the script (or define the path to my script with -p) and register the flow. Flows are defined in ~/.prefect/flows/ (not where I am running the script nor the agent) and when registering the flow, it appears in the ui just fine. However, when I try to run the flow from within the ui, I get:
Failed to load and execute Flow's environment: ValueError('No flows found in file.')
Any ideas what I am doing wrong?
k
Hey @Blake List, could you show me your RunConfig and Storage if you define any?
b
Hi @Kevin Kho The flow is defined as:
with Flow('test-flow',
storage=Local(path="/path/to/test_flow.py",
stored_as_script=True,
add_default_labels=False)) as flow:
do_somthing()
I get the error:
Failed to load and execute Flow's environment: ModuleNotFoundError("No module named '/path/to/test_flow'")
k
Are you running the flow from the same computer?
b
The (local) agent is started from a docker-compose which also binds the /home/user/.prefect/flows directory. The flow is ran from the same machine
Managed to get it all working with the little gem: https://docs.prefect.io/orchestration/agents/local.html#using-with-supervisor I would still like to get a docker agent + registry going but will have to wait for our hpc manager to get back from leave. Is there anyway to remove tenants/teams from the UI?
k
I don’t think you can remove a tenant from the UI, can you open a new thread in the UI channel so I can forward it to the right person?