https://flyte.org logo
#ask-the-community
Title
# ask-the-community
s

Subhash Kumar Singh

03/13/2024, 3:31 PM
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

Kevin Su

03/13/2024, 8:44 PM
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

Subhash Kumar Singh

03/14/2024, 8:42 AM
this command throws me
flag provided but not defined: -builder
k

Kevin Su

03/14/2024, 8:45 AM
which version of envd you are using?
Copy code
pip show envd
s

Subhash Kumar Singh

03/14/2024, 8:45 AM
version 0.3.5
k

Kevin Su

03/14/2024, 8:46 AM
too old, try to use 0.3.45
s

Subhash Kumar Singh

03/14/2024, 8:46 AM
sorry 0.3.45
k

Kevin Su

03/14/2024, 8:47 AM
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

Subhash Kumar Singh

03/14/2024, 8:51 AM
I delete the virtual env and tried once again
and this time it worked
k

Kevin Su

03/14/2024, 8:51 AM
nice!
s

Subhash Kumar Singh

03/14/2024, 8:52 AM
next step shall I do pyflyte run ?
k

Kevin Su

03/14/2024, 8:52 AM
yes
s

Subhash Kumar Singh

03/14/2024, 8:56 AM
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

Kevin Su

03/14/2024, 8:57 AM
could you show me your imageSpec definition?
s

Subhash Kumar Singh

03/14/2024, 9:00 AM
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

Kevin Su

03/14/2024, 9:10 AM
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

Subhash Kumar Singh

03/14/2024, 9:12 AM
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

Kevin Su

03/14/2024, 9:13 AM
seems like a bug, mind creating an issue for it. [flyte-bug]
k

Kevin Su

03/14/2024, 9:13 AM
I can test the sandbox tomorrow morning
s

Subhash Kumar Singh

03/14/2024, 9:13 AM
sure, I will do it. thank you
k

Kevin Su

03/14/2024, 9:14 AM
could you try to use imageSpec(registry=“localhost:30000”) instead of using the image you pushed
s

Subhash Kumar Singh

03/14/2024, 9:15 AM
okay first I will build image using envd
k

Kevin Su

03/14/2024, 9:16 AM
yes, thanks! because I think imageSpec should work
s

Subhash Kumar Singh

03/14/2024, 9:17 AM
in imagespec registry i will add localhost:30000 right
k

Kevin Su

03/14/2024, 9:17 AM
yes
make sure to create a context first
Copy code
envd context create --name flyte-sandbox --builder tcp --builder-address localhost:30003 --use
s

Subhash Kumar Singh

03/14/2024, 9:20 AM
$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

Kevin Su

03/14/2024, 9:20 AM
you need to install envd plugin btw.
Copy code
pip install flytekitplugins-envd
s

Subhash Kumar Singh

03/14/2024, 9:34 AM
It worked !!!!!
I am able to run imagespec
k

Kevin Su

03/14/2024, 9:34 AM
awesome 🎉
s

Subhash Kumar Singh

03/14/2024, 9:34 AM
thank you very much
could you please explain which service running on 30003 and how it pull the image from 30000
k

Kevin Su

03/14/2024, 9:35 AM
but pushing your prebuilt image should work as well, don’t know what’s happening
s

Subhash Kumar Singh

03/14/2024, 9:35 AM
i feel k3s need to be configured to pull image from insecured registry
k

Kevin Su

03/14/2024, 9:35 AM
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

Subhash Kumar Singh

03/14/2024, 9:38 AM
sure
k

Kevin Su

03/14/2024, 9:38 AM
thank you!
s

Subhash Kumar Singh

03/14/2024, 9:38 AM
but 30003 is not exposed in
kubectl get svc
k

Kevin Su

03/14/2024, 9:39 AM
it’s not running in the pod
it’s another process running in the sandbox
s

Subhash Kumar Singh

03/14/2024, 9:40 AM
ohh this I dint knew
@Kevin Su, I was not able to raise the issue today, that I will do it tomorrow.
k

Kevin Su

03/14/2024, 6:08 PM
okok
4 Views