could someone please help me with executing the ta...
# ask-the-community
s
could someone please help me with executing the task: 1. build the dockerimage and pushed to
flyte-sandbox-docker-registry
which is running on port 30000. 2. execute the
pyflyte run --remote --inmage host:30000/<img> <.py> wf
3. Seeing error on dashboard
http:server gave HTTP response to HTTPS client
Could someone please guide me with exact step to fix this issue with
flyte demo cluster
k
looking
could you create a new envd context, and run again
Copy code
envd context create --name flyte-sandbox --builder tcp --builder-address localhost:30003 --use
s
this command throws me
flag provided but not defined: -builder
k
which version of envd you are using?
Copy code
pip show envd
s
version 0.3.5
k
too old, try to use 0.3.45
s
sorry 0.3.45
k
hmm, I’m using 0.3.45 as well
how’s it possible
could you run
envd context create --help
, it should have builder
s
I delete the virtual env and tried once again
and this time it worked
k
nice!
s
next step shall I do pyflyte run ?
k
yes
s
but I have pushed my image already in localhost:30000 image registry but this time getting error in task
3/13/2024 121955 PM UTC [ContainersNotReady|ErrImagePull]: containers with unready status: [f119dfe8b5080445e83d-n0-0]|rpc error: code = Unknown desc = failed to pull and unpack image "192.168.180.8130000/samplev1.0": failed to resolve reference "192.168.180.8130000/samplev1.0": failed to do request: Head "https://192.168.180.81:30000/v2/sample/manifests/v1.0": http: server gave HTTP response to HTTPS client
this image registry comes as part of demo cluster
k
could you show me your imageSpec definition?
s
sorry If i am confusing you, as a first approach I tried with imagespec which dint work for me. So I have taken second approach where I build the image for dockerfile and pushed to localhost:30000 (flyte-sandbox-docker-registry)
I hope I clarified the scenario
k
ah, i see
are are able to pull the image from local registry?
docker pull 192.168.180.8130000/samplev1.0
just make sure image exists
s
yes I am able to pull in host machine after adding insecure registry in / etc/docker/`daemon.sh` but within flyte demo cluster i think some configuration is needed to pull the image while running the task
k
seems like a bug, mind creating an issue for it. [flyte-bug]
k
I can test the sandbox tomorrow morning
s
sure, I will do it. thank you
k
could you try to use imageSpec(registry=“localhost:30000”) instead of using the image you pushed
s
okay first I will build image using envd
k
yes, thanks! because I think imageSpec should work
s
in imagespec registry i will add localhost:30000 right
k
yes
make sure to create a context first
Copy code
envd context create --name flyte-sandbox --builder tcp --builder-address localhost:30003 --use
s
$pyflyte build example.py wf
throws error : Builder None is not registered but I can see in
envd context ls
sandbox context is set
context I created using provided command
k
you need to install envd plugin btw.
Copy code
pip install flytekitplugins-envd
s
It worked !!!!!
I am able to run imagespec
k
awesome 🎉
s
thank you very much
could you please explain which service running on 30003 and how it pull the image from 30000
k
but pushing your prebuilt image should work as well, don’t know what’s happening
s
i feel k3s need to be configured to pull image from insecured registry
k
maybe, need to investigate
which service running on 30003
we run a buildkit daemon in the sandbox to build the image
when you create an envd context, image will be building that daemon in the sandbox
I have a pr to improve the UX. https://github.com/flyteorg/flytekit/pull/2266
3/13/2024 121955 PM UTC [ContainersNotReady|ErrImagePull]: containers with unready status: [f119dfe8b5080445e83d-n0-0]|rpc error: code = Unknown desc = failed to pull and unpack image “192.168.180.8130000/samplev1.0”: failed to resolve reference “192.168.180.8130000/samplev1.0": failed to do request: Head “https://192.168.180.81:30000/v2/sample/manifests/v1.0”: http: server gave HTTP response to HTTPS client
create an issue for it, we’ll take a look
s
sure
k
thank you!
s
but 30003 is not exposed in
kubectl get svc
k
it’s not running in the pod
it’s another process running in the sandbox
s
ohh this I dint knew
@Kevin Su, I was not able to raise the issue today, that I will do it tomorrow.
k
okok