Dominick Olivito
03/03/2022, 3:54 PM/home/flex/.local/bin/prefect: line 3: import: command not found
/home/flex/.local/bin/prefect: line 4: import: command not found
/home/flex/.local/bin/prefect: line 5: from: command not found
/home/flex/.local/bin/prefect: prefect: line 7: syntax error near unexpected token `('
/home/flex/.local/bin/prefect: prefect: line 7: ` sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])'
it looks like it's finding and parsing the prefect
executable file but not running it with python
. when I run a local container using the image, i'm able to successfully call the command prefect
and run a flow. prefect
is in the path of active user (flex
).
i'm also able to run basic flows successfully on GKE using prefect's base image, so the issue is specific to our custom image. do you have any suggestions on what we can check in our custom image?Kevin Kho
03/03/2022, 4:04 PMimport
?Dominick Olivito
03/03/2022, 4:08 PMAnna Geller
03/03/2022, 4:14 PMDominick Olivito
03/04/2022, 5:24 PMENTRYPOINT
on our image.
we finally got our custom image to work with Prefect on Kubernetes by using the same entrypoint.sh script and config as in the official Prefect image:
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
# script will be run as a non-root user
RUN chmod 555 /usr/local/bin/entrypoint.sh
ENTRYPOINT ["tini", "-g", "--", "entrypoint.sh"]
Kevin Kho
03/04/2022, 6:06 PM