skillfed

metaflow-prebuilt

Metaflow extension: pre-bake conda environments into Docker images for fast cold starts

metaflow-prebuilt v0.3.5 98.5K downloads/30d#13,082 on PyPI60
Permissive license Apache Software License Active released

What it is and what it does

metaflow-prebuilt is a Metaflow extension that shifts dependency resolution and Docker image building from task runtime to deployment time. Instead of each task bootstrapping its conda environment when it starts, the extension resolves the environment spec for each step during deployment, builds a Docker image with all dependencies pre-installed, pushes it to a registry, and configures the remote runner to pull that image. This eliminates the conda bootstrap overhead at task startup, reducing cold-start latency.

The extension supports multiple build services (local Docker, Buildx, Kaniko, AWS CodeBuild) and image registries (Docker Hub, ECR, GCR, local), configured via environment variables. It is designed for teams running Metaflow flows on Batch, Kubernetes, or other remote runners where pre-built images provide measurable startup improvements. The extension is extensible: you can subclass DockerBuildService or ImageRegistry to add custom backends.

Use it for:

  • Deploy Metaflow flows on AWS Batch with pre-built ECR images to reduce task cold-start time.
  • Run Metaflow workflows on Kubernetes using Kaniko to build and cache images without a local Docker daemon.
  • Integrate Metaflow with AWS CodeBuild for centralized image builds and push to ECR in CI/CD pipelines.
  • Develop and test Metaflow flows locally using a local registry container before pushing to production.
  • Extend the build or registry layer with custom implementations for proprietary image storage or build infrastructure.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Metaflow extension that pre-bakes conda and PyPI dependencies into Docker images at deploy time, eliminating conda bootstrap overhead when tasks start on remote runners.

Yes, if you run Metaflow flows on remote infrastructure (Batch, Kubernetes) and want to reduce task startup latency by pre-baking dependencies. The extension is actively maintained, has low install friction, and offers a clean configuration model. Install only if you have a registry and build service already available or planned; it adds no value for local-only flows.

Install

metaflow-prebuilt on PyPI

pip

pip install metaflow-prebuilt

uv

uv add metaflow-prebuilt

poetry

poetry add metaflow-prebuilt

Installing metaflow-prebuilt

Before you install

Low install friction; wheel-based distribution. Active maintenance with a recent release 46 days ago. Depends on metaflow and metaflow-netflixext, both of which must be available in your environment.

License in practice

Apache Software License is permissive, allowing commercial and private use with minimal restrictions; suitable for most production deployments.

Quickstart

pip install metaflow-prebuilt

from metaflow import FlowSpec, step, conda

class MyFlow(FlowSpec):
    @conda(packages={"numpy": "1.26.4"})
    @step
    def start(self):
        self.next(self.end)

    @step
    def end(self):
        pass

if __name__ == "__main__":
    MyFlow()

# Deploy: python my_flow.py --environment=prebuilt batch run

Requires Python 3.10 or later; requires a configured Docker registry and build service to be set up before deployment.

Verify before relying

  • Whether optional extras (ecr, gcr, kaniko) are required for specific cloud backends or if base install works with environment variables alone.
  • Performance improvement magnitude compared to standard conda bootstrap in typical workflows.
  • Compatibility with metaflow versions prior to or after the first_release date of this extension.

Package facts

License Apache Software License (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 2 — metaflow, metaflow-netflixext
Maintenance actively maintained — 46 days since the last release
Last repo commit
First released
Downloads 98,470/month — #13,082 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: metaflow_prebuilt-0.3.5-py2.py3-none-any.whl

Development Status :: 4 - BetaLicense :: OSI Approved :: Apache Software LicenseOperating System :: MacOS :: MacOS XOperating System :: POSIX :: LinuxProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Tags

metaflow docker environment cachingpre-built conda docker imagesfast metaflow task startupmetaflow deployment optimizationdocker image registry integrationmetaflow batch kubernetes deploymentconda environment pre-baking
metaflow-extensiondocker-optimizationworkflow-deployment

More Distributed Computing packages