Hello. I am able to register my python workflows t...
# flyte-support
c
Hello. I am able to register my python workflows through
pyflyte register
and able to see it in the UI, however I am importing some packages like boto3 etc and it throws and error while running the workflow.
thanks @tall-lock-23197, will run using the docker image
I am getting a
Missing argument 'PACKAGE_OR_MODULE...', at least one PACKAGE_OR_MODULE is required but multiple can be passed
error when I run
pyflyte register -p my_workflows -i flyte_select_wf:latest
where flyte_select_wf is my image
After registering the code successfully, I am getting an error
currentAttempt done. Last Error: USER::containers with unready status: [a4vlxhxkkr8mkxh92lw9-n0-0]|Back-off pulling image "flyte_select_wf:latest"
t
Can try running the command I sent you earlier:
flytectl demo exec -- docker build . --tag "flyte_select_wf:v1"
?
c
I am able to build my docker image independently but when I try to run it with
flytectl demo exec
it throws the following error
t
Sorry the command doesn’t work cause the Dockerfile won’t be available in the demo cluster.
c
yeah. Is there any alternative for quick check, or some working example I can glance through where an external library and files are imported in the workflow python file?
t
Can you try https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry? Try pushing the image to your github account. It’ll by default be private. You can follow the private registry guide to access the images in case you want the image to remain private.
I don’t think you can access the image if it’s present locally.
c
alright will do
t
@glamorous-carpet-83516, am I right? Is there a way to access docker image in a demo cluster if the image is present locally?
g
yeah, I don’t think image can be accessed in k3s cluster if it’s present locally. You can also try to push to docker hub
Copy code
docker tag flyte_select_wf:v1 <docker_account>/flyte_select_wf:v1
docker push <docker_account>/flyte_select_wf:v1
c
[1/1] currentAttempt done. Last Error: USER::containers with unready status: [a79kkwndktg4rbwswjp9-n0-0]|Back-off pulling image “ghcr.io/main2adwitiya/gunjan_select:latest
same error for the registry image
f
@freezing-boots-56761 / @thankful-minister-83577 fyi. @careful-processor-58786 we are infact working on adding a dummy docker registry to the demo environment
@tall-lock-23197 why can he not have the dockerfile in his source path? —source ./ and have dockerfile there? Then it should work right
👍 1
t
@careful-processor-58786 so the
flytectl demo
environment runs a docker in docker image - there’s a separate docker daemon in the container (the container that’s running k3s). To get around this you can do a couple things - 1 suggested above, push to an external docker registry like dockerhub or ghcr, or 2, run the demo environment with
flytectl demo start --source .
This will mount in the current folder into the docker in docker container, and you can build your image inside, where it will be visible to the k3s cluster. There’s a longer term fix coming out in the next couple weeks where the demo environment will just spin up a local docker registry that is pushable right from your desktop environment but pullable from within k3s. this means we can move away from the
--source
flag since you won’t need to mount your code into the d-in-d container.
👍 2
👀 1
211 Views