This might not be supported, but we're trying to r...
# ask-community
e
This might not be supported, but we're trying to run a docker agent on windows with a named pipe file mounted as a volume. The registration works fine with docker storage, and we can run the container manually from an anaconda prompt and hit the pipe file from within the container with:
Copy code
docker run -v "//.pipe/<named_pipe>://.pipe/<named_pipe>" —rm -it <image>
It also doesn't throw any error when we start the prefect agent with:
Copy code
prefect agent docker start --label <agent_label> --volume "//.pipe/<named_pipe>://.pipe/<named_pipe>"
but once we try to actually run the workflow it fails with this message:
Copy code
Internal Server Error ("invalid volume specification: '\\.\pipe\<named_pipe>:\pipe\<named_pipe>:/pipe/<named_pipe>:/pipe/<named_pipe>:rw'")
I'm not really sure why it seems to be duplicating the volume map and removing some of the forward slashes. Is this supported at all? Worst case we can probably subclass the docker agent and hardcode the
run_flow()
command but we'd like to avoid having extra code on the agent side.
k
So this is supported here . I will look into it
e
Hi @Kevin Kho, were you able to find anything on this?
k
So I remember this and I did try to look but could not find a reason it was being duplicated. I will ask some other engineers about this. Sorry about that.
a
@Erik Amundson Looking at this, you can try the following: #1 Try to use a local agent for a flow that needs access to this pipe because based on this: “Unlike Unix, there is no command line interface, except for PowerShell. Named pipes cannot be created as files within a normal filesystem, unlike in Unix.” — it looks like this file was created on Windows and it doesn’t work the same way on a Linux container. So using it in a local process may work better. #2 Put this file into one larger directory and mount this directory as volume rather than just this pipe file
e
So we are running a windows-based container (python:3.9.9-windowsservercore-1809 as our base image). We're able to mount the named pipe with docker from an anaconda prompt and access it from within the running container, which is why I thought it might be a limitation of the docker agent specifically. We could switch to a local agent but we'd like to use Docker storage if possible.
a
Afaik, Prefect doesn’t work with Windows-based containers, but it works perfectly fine with local agents deployed on windows. That’s why I would recommend a local agent with a local subprocess to access that named pipe.
e
Alright, thank you!