https://flyte.org logo
m

Matheus Moreno

05/06/2022, 8:01 PM
Hey, everyone! I'm kinda confused on how to use custom images on a sandbox with Flyte 1.x.x. At first I thought the sandbox would pull the image from my local repository, but this doesn't seem to be the case, since I'm receiving the error
containers with unready status: [ash8dlh4m294mnd9psbs-f62iya2y-0]|Back-off pulling image "flyte-example:1.0"
when trying to execute a workflow, even though I have the flyte-example:1.0 image on my local repo. But, at the same time, it doesn't seem like I should have to build the image inside the sandbox container, right? The container from
flytectl demo start
doesn't even mount the working directory into
/root
. I can't find anything in the documentation that says how to do this...
n

Niels Bantilan

05/06/2022, 8:04 PM
if you do
flytectl demo start --source .
your working directory will be mounted onto the demo cluster container, and you can use
flytectl demo exec docker build /root --tag …
to build the custom container from within the demo container
@Marc Paquette @Smriti Satyan @Samhita Alla @Alekhya friendly ping to make sure we make an issue to document this [create new docs issue]
👍 1
m

Matheus Moreno

05/06/2022, 8:06 PM
Oh, ok, so it's the same behavior as before! But why doesn't it mount to the pwd automatically like
flytectl sandbox start
does?
I honestly thought this new version of the sandbox used the local repository directly, without the requirement of building the image inside the container. I must have read something wrong
n

Niels Bantilan

05/06/2022, 8:09 PM
interesting, I wasn’t aware of that default behavior for `flytectl sandbox`… @Yuvraj @Prafulla Mahindrakar was there a reason behind this, or should we implement that same behavior for
flytectl demo start
?
m

Marc Paquette

05/06/2022, 8:10 PM
@Matheus Moreno Thanks for bringing this up. Is there a specific doc page that caused this confusion?
m

Matheus Moreno

05/06/2022, 8:11 PM
@Niels Bantilan sorry, I'm wrong. The documentation says that `flytectl sandbox start`without the source flag doesn't contain any source code
👍 1
n

Niels Bantilan

05/06/2022, 8:12 PM
I honestly thought this new version of the sandbox used the local repository directly, without the requirement of building the image inside the container. I must have read something wrong
so I’m fuzzy on the details (maybe someone more knowledgeable can answer) but from what I understand
flytectl demo
starts a cluster using a single binary for many of the flyteadmin services but still needs to use the docker-in-docker system we used for
flytectl sandbox
to pull images for the postgres service (and I think 2 others), but the result is that it spins up a lot more quickly than old sandbox
y

Yee

05/06/2022, 8:13 PM
that is correct yeah.
m

Matheus Moreno

05/06/2022, 8:14 PM
@Marc Paquette this section specifically is kinda ambiguous. it says that local images will be available for the cluster without specifying that they have to be build inside the cluster container https://docs.flyte.org/projects/cookbook/en/latest/auto/deployment/deploying_workflows.html#building-images
👀 2
I think this should be explained in more detail. the new "Getting Started" is very good, but I think it should mention this (or at least link to another part of the documentation)
Using the search mechanism, the only instance of
exec -- docker build
that I could find was buried inside Flytesnacks contribution guide: https://docs.flyte.org/projects/cookbook/en/latest/contribute.html#contribute-to-examples
y

Yee

05/06/2022, 8:20 PM
yes this is good feedback thank you.
and yeah that is correct… there are two daemons weirdly.
would be great if the registry was shared at least but that was difficult to do.
p

Prafulla Mahindrakar

05/11/2022, 6:52 AM
yes currently we couldn’t find a way to share the registry within another child container process. If you find a way we would love to have this contribution as it would make it even more simpler. Heres another way i do if i am serializing core examples from cookbook which builds the image in the demo container registry.
Copy code
flytectl demo start --source ~/flytesnacks/cookbook/
flytectl demo exec --  make -C core/ serialize
flytectl register file  ~/flytesnacks/cookbook/core/_pb_output/*  -d development  -p flytesnacks --version v1
flytectl get launchplan -p flytesnacks -d development  core.flyte_basics.lp.go_greet --latest --execFile execFile.yaml
flytectl create execution -p flytesnacks -d development --execFile execFile.yaml
y

Yee

05/11/2022, 3:23 PM
cc @Marc Paquette
👀 1
3 Views