Matheus Moreno

    Matheus Moreno

    4 months ago
    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...
    Niels Bantilan

    Niels Bantilan

    4 months ago
    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]
    Matheus Moreno

    Matheus Moreno

    4 months ago
    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
    Niels Bantilan

    Niels Bantilan

    4 months ago
    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
    ?
    Marc Paquette

    Marc Paquette

    4 months ago
    @Matheus Moreno Thanks for bringing this up. Is there a specific doc page that caused this confusion?
    Matheus Moreno

    Matheus Moreno

    4 months ago
    @Niels Bantilan sorry, I'm wrong. The documentation says that flytectl sandbox startwithout the source flag doesn't contain any source code
    Niels Bantilan

    Niels Bantilan

    4 months ago
    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
    Yee

    Yee

    4 months ago
    that is correct yeah.
    Matheus Moreno

    Matheus Moreno

    4 months ago
    @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
    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
    Yee

    Yee

    4 months ago
    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

    4 months ago
    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.
    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
    Yee

    Yee

    4 months ago
    cc @Marc Paquette