I'm trying to implement a new flow to run with con...
# ask-community
w
I'm trying to implement a new flow to run with container. But I'm getting this error when deploying. How do I resolve this?
Copy code
Traceback (most recent call last):
  ...
  Remote Storage block must have 'get-directory' capabilities. (type=value_error)
j
Hi! My instinct is that the Docker block is an infrastructure block, not a storage block. You'd need an S3 block, Azure block, GitHub block, or use local storage - just to name a few. The Docker block is just HOW you want to run your flow, but not where the flow code is stored.
w
oh really
j
Let me grab a screenshot of what I was doing...
👀 1
az_block = Azure.load("azure-blob-block")
docker_container_block = DockerContainer.load("docker-block")
deployment = Deployment.build_from_flow(
flow=flow.with_options(name="EmilIsTheBest"),
name=config["name"],
description=config["description"],
tags=config["tags"],
work_queue_name=environment,
output=True,
apply=True,
storage=az_block,
infrastructure=docker_container_block,
path=config["name"]
)
🙌 1
w
I didn't quite understand how that would work. But with your example I managed to have a better understanding and direction of what I need to do. Thank you very much!
j
You're welcome. Ping me if you run into anything else.
🙏 1
Also, I think build_from_flow has a parameter called "apply=True" - so you don't need the extra step 🙂
😧 1
w
I'm still having a little trouble running a flow in the container. When creating and executing the flow, it manages to start from the container, but it does not find the file path
j
what happens if you remove the storage parameter all together
w
it tries to download the code from opt/
j
Is that where your flow code is located?
Also, are you running local server or cloud?
w
opt is the container directory. I'm not sure which container directory Prefect references the code in. I'm running the server locally.
j
So, are you using the stock prefecthq image?
w
sure
j
I'm perplexed! lol