envd is a free, open source machine learning infrastructure project written in Go and released under Apache-2.0. It has 2,242 GitHub stars, 169 forks and 139 open issues, and was last pushed 19 hours ago. On this registry it ranks #51 of 89 tracked projects in Machine Learning Infrastructure, with 5 head-to-head comparisons available. It gained 6 stars over the last 30 tracked days.

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.3s
 => => resolve docker.io/tensorchord/envd-sshd-from-scratch:v0.4.3                            2.3s
 => docker-image://docker.io/library/ubuntu:22.04                                             0.0s
......
 => [internal] pip install numpy                                                              2.5s
 => CACHED [internal] download fish shell                                                     0.0s
 => [internal] configure user permissions for /opt/conda                                      1.0s
 => [internal] create dir for ssh key                                                         0.5s
 => [internal] install ssh keys                                                               0.2s
 => [internal] copy fish shell from the builder image                                         0.2s
 => [internal] install fish shell                                                             0.5s
......
 => [internal] create work dir: /home/envd/envd-quick-start                                   0.2s
 => exporting to image                                                                        7.7s
 => => exporting layers                                                                       7.7s
 => => writing image sha256:464a0c12759d3d1732404f217d5c6e06d0ee4890cccd66391a608daf2bd314e4  0.0s
 => => naming to docker.io/library/envd-quick-start:dev                                       0.0s
------
 > importing cache manifest from docker.io/tensorchord/python-cache:envd-v0.4.3:
------
โฃฝ [5/5] attach the environment  [2s]            
Welcome to fish, the friendly interactive shell
Type help for instructions on how to use fish

envd-quick-start on git master [!] via Py v3.11.11 via ๐Ÿ…’ envd as sudo 
โฌข [envd]โฏ # You are in the container-based environment!

Set up Jupyter notebook

Please edit the build.envd to enable jupyter notebook:

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")
    config.jupyter()

You can get the endpoint of the running Jupyter notebook via envd envs ls.

$ envd up --detach
$ envd envs ls
NAME                    JUPYTER                 SSH TARGET              CONTEXT                                 IMAGE                   GPU     CUDA    CUDNN   STATUS          CONTAINER ID
envd-quick-start        http://localhost:42779   envd-quick-start.envd   /home/gaocegege/code/envd-quick-start   envd-quick-start:dev    false   <none>  <none>  Up 54 seconds   bd3f6a729e94

Difference between v0 and v1 syntax

[!NOTE] Start from envd v1.0, v1 syntax is the default syntax for build.envd file, and moby-worker is the default builder.

Features v0 v1
is default for `envd [!IMPORTANT]

For more details, check the upgrade to v1 doc.

More on documentation ๐Ÿ“

See envd documentation.

Roadmap ๐Ÿ—‚๏ธ

Please checkout ROADMAP.

Contribute ๐Ÿ˜Š

We welcome all kinds of contributions from the open-source community, individuals, and partners.

Open in Gitpod

Contributors โœจ

Thanks goes to these wonderful people (emoji key):

 Friends A.
Friends A.

๐Ÿ“– ๐ŸŽจ
Aaron Sun
Aaron Sun

๐Ÿ““ ๐Ÿ’ป
Aka.Fido
Aka.Fido

๐Ÿ“ฆ ๐Ÿ“– ๐Ÿ’ป
Alex Xi
Alex Xi

๐Ÿ’ป
Bingtan Lu
Bingtan Lu

๐Ÿ’ป
Bingyi Sun
Bingyi Sun

๐Ÿ’ป
Ce Gao
Ce Gao

๐Ÿ’ป ๐Ÿ“– ๐ŸŽจ ๐Ÿ“†
Frost Ming
Frost Ming

๐Ÿ’ป ๐Ÿ“–
Guangyang Li
Guangyang Li

๐Ÿ’ป
Gui-Yue
Gui-Yue

๐Ÿ’ป
Haiker Sun
Haiker Sun

๐Ÿ’ป
Ikko Ashimine
Ikko Ashimine

๐Ÿ’ป
Isaac
Isaac

๐Ÿ’ป
JasonZhu
JasonZhu

๐Ÿ’ป
Jian Zeng
Jian Zeng

๐ŸŽจ ๐Ÿค” ๐Ÿ”ฌ
Jinjing Zhou
Jinjing Zhou

๐Ÿ› ๐Ÿ’ป ๐ŸŽจ ๐Ÿ“–
Jun
Jun

๐Ÿ“ฆ ๐Ÿ’ป
Kaiyang Chen
Kaiyang Chen

๐Ÿ’ป
Keming
Keming

๐Ÿ’ป ๐Ÿ“– ๐Ÿค” ๐Ÿš‡
Kevin Su
Kevin Su

๐Ÿ’ป
Ling Jin
Ling Jin

๐Ÿ› ๐Ÿš‡
Manjusaka
Manjusaka

๐Ÿ’ป
Nino
Nino

๐ŸŽจ ๐Ÿ’ป
Pengyu Wang
Pengyu Wang

๐Ÿ“–
Sepush
Sepush

๐Ÿ“–
Shao Wang
Shao Wang

๐Ÿ’ป
Siyuan Wang
Siyuan Wang

๐Ÿ’ป ๐Ÿš‡ ๐Ÿšง
Suyan
Suyan

๐Ÿ“–
To My
To My

๐Ÿ“–
Tumushimire Yves
Tumushimire Yves

๐Ÿ’ป
Wei Zhang
Wei Zhang

๐Ÿ’ป
Weixiao Huang
Weixiao Huang

๐Ÿ’ป
Weizhen Wang
Weizhen Wang

๐Ÿ’ป
XRW
XRW

๐Ÿ’ป
Xu Jin
Xu Jin

๐Ÿ’ป
Xuanwo
Xuanwo

๐Ÿ’ฌ ๐ŸŽจ ๐Ÿค” ๐Ÿ‘€
Yijiang Liu
Yijiang Liu

๐Ÿ’ป
Yilong Li
Yilong Li

๐Ÿ“– ๐Ÿ› ๐Ÿ’ป
Yuan Tang
Yuan Tang

๐Ÿ’ป ๐ŸŽจ ๐Ÿ“– ๐Ÿค”
Yuchen Cheng
Yuchen Cheng

๐Ÿ› ๐Ÿš‡ ๐Ÿšง ๐Ÿ”ง
Yuedong Wu
Yuedong Wu

๐Ÿ’ป
Yunchuan Zheng
Yunchuan Zheng

๐Ÿ’ป
Zheming Li
Zheming Li

๐Ÿ’ป
Zhenguo.Li
Zhenguo.Li

๐Ÿ’ป ๐Ÿ“–
Zhenzhen Zhao
Zhenzhen Zhao

๐Ÿš‡ ๐Ÿ““ ๐Ÿ’ป
Zhizhen He
Zhizhen He

๐Ÿ’ป ๐Ÿ“–
cutecutecat
cutecutecat

๐Ÿ’ป
dqhl76
dqhl76

๐Ÿ“– ๐Ÿ’ป
heyjude
heyjude

๐Ÿ’ป
jimoosciuc
jimoosciuc

๐Ÿ““
kenwoodjw
kenwoodjw

๐Ÿ’ป
li mengyang
li mengyang

๐Ÿ’ป
nullday
nullday

๐Ÿค” ๐Ÿ’ป
rrain7
rrain7

๐Ÿ’ป
tison
tison

๐Ÿ’ป
wangxiaolei
wangxiaolei

๐Ÿ’ป
wyq
wyq

๐Ÿ› ๐ŸŽจ ๐Ÿ’ป
x0oo0x
x0oo0x

๐Ÿ’ป
xiangtianyu
xiangtianyu

๐Ÿ“–
xieydd
xieydd

๐Ÿ’ป
xing0821
xing0821

๐Ÿค” ๐Ÿ““ ๐Ÿ’ป
xxchan
xxchan

๐Ÿ“–
zhang-wei
zhang-wei

๐Ÿ’ป
zhyon404
zhyon404

๐Ÿ’ป
ๆจๆˆ้”ด
ๆจๆˆ้”ด

๐Ÿ’ป

This project follows the all-contributors specification. Contributions of any kind welcome!

License ๐Ÿ“‹

Apache 2.0

trackgit-views

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,242 GitHub stars.