Hey, everyone! I'm kinda confused on how to use cu...
# announcements
s
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...
b
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
@echoing-queen-96254 @billowy-sundown-31926 @tall-lock-23197 @early-rain-275 friendly ping to make sure we make an issue to document this [create new docs issue]
👍 1
s
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
b
interesting, I wasn’t aware of that default behavior for `flytectl sandbox`… @great-school-54368 @icy-agent-73298 was there a reason behind this, or should we implement that same behavior for
flytectl demo start
?
e
@sparse-window-1536 Thanks for bringing this up. Is there a specific doc page that caused this confusion?
s
@broad-monitor-993 sorry, I'm wrong. The documentation says that `flytectl sandbox start`without the source flag doesn't contain any source code
👍 1
b
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
t
that is correct yeah.
s
@echoing-queen-96254 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
t
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.
i
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
t
cc @echoing-queen-96254
👀 1
166 Views