Open alexschroeter opened 3 months ago
Ah i understand the error. When inspecting the definitions in the container the definition registry is dumped to stdin, which is then parse through the CLI. However if the app.py dumps to stdin anyways it cannot parse the JSON. easiest fix is to prepfix the inspectedted definitions with a magic phrase so that we could detect that in the cli. But open for other ideas!
Ok, I have the following thoughts.
I think we could still rely on stdout and integrat a magic bytstring that would indicate the beginning of the definitions and the end e.g. "MY_MAGIC_ARKITEKT_KEYWORD::{"json": "defintions"}::MY_MAGIC_ARKITEKT_KEYWORK", this would be the easiest workaround for now.
I believe this should be the long term goal, especially if we would like to run a container with a specific task once and then shut it down, something like "arkitekt call function_name arg=0 arg1=1". There was a functional prototype for this behaviour once, but I have not investiragted it further.
This is the relevant codepart: arkitekt/cli/commands/call/local.py, however with reuest_next the api is going to change slightly (i think it might still be worthwhile to test it out though.
It seems there is something missing for the inspect part of my Dockerfile (see below) although the build is working
Dockerfile
Error: