Hey folks, I’m having trouble getting a multi-stag...
# ask-metaflow
m
Hey folks, I’m having trouble getting a multi-stage-built container running with
@batch
. (The motivation in this case for the multi-stage build is mainly to save space/time.) I’ve tried a build like this:
Copy code
FROM python:3.11 as build-stage

RUN python -m venv /opt/venv

ENV PATH="/opt/venv/bin:$PATH"

#... install python dependencies to venv ...

FROM python:3.11-slim as deploy-stage

COPY --from=build-stage /opt/venv /opt/venv

ENV PATH="/opt/venv/bin:$PATH"
And a version of the above which adds the ENV/WORKDIR/USER lines mentioned in the docs (ref). Either version yields an error like:
Copy code
Data store error:
No completed attempts of the task was found for task '<my-task-path>'
The same flow runs successfully to completion if I use a one-stage build, ie one that just starts from
python:3.11
. Any help appreciated.
1