envd is a free, open source machine learning infrastructure project written in Go and released under Apache-2.0. It has 2,230 GitHub stars, 168 forks and 139 open issues, and was last pushed 2 months ago. On this registry it ranks #45 of 57 tracked projects in Machine Learning Infrastructure, with 5 head-to-head comparisons available.

What is envd?

What it is

envd is a command-line tool for creating container-based development environments for AI and machine learning work. It lives in the AI & Machine Learning / Machine Learning Infrastructure ecosystem and is written in Go under the Apache-2.0 license. The project is presented as a reproducible development environment for humans and agents, with topics such as buildkit, docker, llmops, mlops, model-serving, code-agent, and codex.

The concrete problem it addresses is the difficulty of assembling AI/ML environments when dependencies span Python, CUDA, shell scripts, and Dockerfiles. envd asks users to declare packages and tools in build.envd, then start the environment with envd up. This aims to reduce repeated manual setup and make the resulting environment portable through OCI-compatible images.

Key capabilities

  • envd uses a Python-based environment description, with examples that call base(dev=True), install.conda(), install.python(), install.python_packages(name = [ "numpy", ]), shell("fish"), and config.jupyter().
  • It creates isolated spaces for training, fine-tuning, or serving, and uses buildkit to build environments.
  • It produces OCI-compatible images, so environments can be pushed to container registries such as Harbor or Docker Hub.
  • It supports local and Kubernetes workflows through envd context use local and envd context use cluster, while keeping the same envd up command.
  • It supports remote build and software caching, including pip index caches and apt cache, so previously downloaded PyPI and APT packages can be reused.
  • It supports knowledge reuse through include of Git repositories, as shown by envdlib = include("https://github.com/tensorchord/envdlib") and envdlib.tensorboard(host_port=8888).

Who uses it and how

  • AI/ML developers use envd to create reproducible container-based workspaces for Python, CUDA, conda, Jupyter, and related toolchains.
  • Teams use envd to share environments through OCI-compatible images and registries such as Harbor or Docker Hub.
  • Hybrid users run envd up locally with envd context use local, or run the same command against a Kubernetes cluster with envd context use cluster.
  • Users with limited local resources use remote build on another machine or cloud server, then push the resulting environment image to a registry.
  • Projects that need reusable setup logic import Git-hosted build functions, such as the envdlib example that configures TensorBoard.

Getting started

The README shows users declaring packages and tools in build.envd, then running envd up to create the environment. It also shows switching between local and cluster execution with envd context use local and envd context use cluster.

When to use it β€” and when not to

envd is useful when a team needs reproducible, OCI-compatible AI/ML environments and wants to reuse build logic through Git imports and buildkit caching. It is less suitable when users want to avoid operating build, context, Kubernetes, and registry workflows, because the facts describe local, cluster, remote build, and registry usage. The repository shows 139 open issues and no listed contributor count, so teams should review maintenance status before depending on it for critical workflows.

project readme (upstream, from github) β€” read inline
envd cat wink envd cat wink

Development environment for AI/ML

discord invitation link trackgit-views Python Version all-contributors envd package downloads continuous integration Coverage Status

What is envd?

envd (ΙͺnˈvdΙͺ) is a command-line tool that helps you create the container-based development environment for AI/ML.

Creating development environments is not easy, especially with today's complex systems and dependencies. With everything from Python to CUDA, BASH scripts, and Dockerfiles constantly breaking, it can feel like a nightmare - until now!

Instantly get your environment running exactly as you need with a simple declaration of the packages you seek in build.envd and just one command: envd up!

Why use envd?

Environments built with envd provide the following features out-of-the-box:

Simple CLI and language

envd enables you to quickly and seamlessly integrate powerful CLI tools into your existing Python workflow to provision your programming environment without learning a new language or DSL.

def build():
    base(dev=True)
    install.conda()
    install.python()
    install.python_packages(name = [
        "numpy",
    ])
    shell("fish")
    config.jupyter()

Isolation, compatible with OCI image

With envd, users can create an isolated space to train, fine-tune, or serve. By utilizing sophisticated virtualization technology as well as other features like buildkit, it's an ideal solution for environment setup.

envd environment image is compatible with OCI image specification. By leveraging the power of an OCI image, you can make your environment available to anyone and everyone! Make it happen with a container registry like Harbor or Docker Hub.

Local, and cloud

envd can now be used on a hybrid platform, ranging from local machines to clusters hosted by Kubernetes. Any of these options offers an efficient and versatile way for developers to create their projects!

$ envd context use local
# Run envd environments locally
$ envd up
...
$ envd context use cluster
# Run envd environments in the cluster with the same experience
$ envd up

Check out the doc for more details.

Build anywhere, faster

envd offers a wealth of advantages, such as remote build and software caching capabilities like pip index caches or apt cache, with the help of buildkit - all designed to make your life easier without ever having to step foot in the code itself!

Reusing previously downloaded packages from the PyPI/APT cache saves time and energy, making builds more efficient. No need to redownload what was already acquired before – a single download is enough for repeat usage!

With Dockerfile v1, users are unable to take advantage of PyPI caching for faster installation speeds - but envd offers this support and more!

Besides, envd also supports remote build, which means you can build your environment on a remote machine, such as a cloud server, and then push it to the registry. This is especially useful when you are working on a machine with limited resources, or when you expect a build machine with higher performance.

Knowledge reuse in your team

Forget copy-pasting Dockerfile instructions - use envd to easily build functions and reuse them by importing any Git repositories with the include function! Craft powerful custom solutions quickly.

envdlib = include("https://github.com/tensorchord/envdlib")

def build():
    base(dev=True)
    install.conda()
    install.python()
    envdlib.tensorboard(host_port=8888)
envdlib.tensorboard is defined in github.com/tensorchord/envdlib
def tensorboard(
    envd_port=6006,
    envd_dir="/home/envd/logs",
    host_port=0,
    host_dir="/tmp",
):
    """Configure TensorBoard.

    Make sure you have permission for `host_dir`

    Args:
        envd_port (Optional[int]): port used by envd container
        envd_dir (Optional[str]): log storage mount path in the envd container
        host_port (Optional[int]): port used by the host, if not specified or equals to 0,
            envd will randomly choose a free port
        host_dir (Optional[str]): log storage mount path in the host
    """
    install.python_packages(["tensorboard"])
    runtime.mount(host_path=host_dir, envd_path=envd_dir)
    runtime.daemon(
        commands=[
            [
                "tensorboard",
                "--logdir",
                envd_dir,
                "--port",
                str(envd_port),
                "--host",
                "0.0.0.0",
            ],
        ]
    )
    runtime.expose(envd_port=envd_port, host_port=host_port, service="tensorboard")

Getting Started πŸš€

Requirements

  • Docker (20.10.0 or above)

Install and bootstrap envd

envd can be installed with pip, or you can download the binary release directly. After the installation, please run envd bootstrap to bootstrap.

pip install --upgrade envd

After the installation, please run envd bootstrap to bootstrap:

envd bootstrap

Read the documentation for more alternative installation methods.

You can add --dockerhub-mirror or -m flag when running envd bootstrap, to configure the mirror for docker.io registry:

envd bootstrap --dockerhub-mirror https://docker.mirrors.sjtug.sjtu.edu.cn

Create an envd environment

Please clone the envd-quick-start:

git clone https://github.com/tensorchord/envd-quick-start.git

The build manifest build.envd looks like:

def build():
    base(dev=True)
    install.conda()
    install.python()
    # Configure the pip index if needed.
    # config.pip_index(url = "https://pypi.tuna.tsinghua.edu.cn/simple")
    install.python_packages(name = [
        "numpy",
    ])
    shell("fish")

Note that we use Python here as an example but please check out examples for other languages such as R and Julia here.

Then please run the command below to set up a new environment:

cd envd-quick-start && envd up
$ cd envd-quick-start && envd up
[+] ⌚ parse build.envd and download/cache dependencies 6.2s βœ… (finished) 
[+] build envd environment 19.0s (47/47) FINISHED                                                 
 => CACHED [internal] setting pip cache mount permissions                                     0.0s
 => docker-image://docker.io/tensorchord/envd-sshd-from-scratch:v0.4.3                        2.3

readme truncated β€” read the full docs on github

Frequently asked questions

Is envd free to use?

envd is open source under the Apache-2.0 licence. There is no licence fee and no seat count β€” you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does envd do?

πŸ•οΈ Reproducible development environment for humans and agents

What is envd written in?

envd is primarily written in Go. Its source is publicly available at https://github.com/tensorchord/envd, and it has 2,230 GitHub stars.