--- id: metaflow-prebuilt version: "0.3.5" license: Apache Software License license_treatment: permissive maintenance: active --- # metaflow-prebuilt — Metaflow extension: pre-bake conda environments into Docker images for fast cold starts License: permissive · Maintenance: active · Downloads: 98.5K/mo ## 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 above — 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 pip install metaflow-prebuilt uv add metaflow-prebuilt 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_current - Install friction: low - Maintenance: active - Downloads: 98.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags metaflow docker environment caching, pre-built conda docker images, fast metaflow task startup, metaflow deployment optimization, docker image registry integration, metaflow batch kubernetes deployment, conda environment pre-baking, metaflow-extension, docker-optimization, workflow-deployment [View on SkillFed](https://skillfed.io/packages/metaflow-prebuilt) · [View on PyPI](https://pypi.org/project/metaflow-prebuilt/)