Skip to main content

A development environment management tool for data scientists.

Project description

Development environment for AI/ML

discord invitation link trackgit-views Python Version all-contributors envd package donwloads 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.

Development environments are full of python and system dependencies, CUDA, BASH scripts, Dockerfiles, SSH configurations, Kubernetes YAMLs, and many other clunky things that are always breaking. envd is to solve the problem:

  1. Declare the list of dependencies (CUDA, python packages, your favorite IDE, and so on) in build.envd
  2. Simply run envd up.
  3. Develop in the isolated environment.

Why use envd?

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

❤️ Knowledge reuse in your team

envd build functions can be reused. Use include function to import any git repositories. No more copy/paste Dockerfile instructions, let's reuse them.

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

def build():
    base(os="ubuntu20.04", language="python")
    envdlib.tensorboard(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="/var/log/tensorboard"):
    """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",
                "/home/envd/logs",
                "--port",
                str(envd_port),
                "--host",
                "0.0.0.0",
                ">>tensorboard.log",
                "2>&1",
            ],
        ]
    )
    runtime.expose(envd_port=envd_port, host_port=host_port, service="tensorboard")

⏱️ Builtkit native, build up to 6x faster

Buildkit supports parallel builds and software cache (e.g. pip index cache and apt cache). You can enjoy the benefits without knowledge of it.

For example, the PyPI cache is shared across builds and thus the package will be cached if it has been downloaded before.

🐍 One configuration to rule them all

Development environments are full of Dockerfiles, bash scripts, Kubernetes YAML manifests, and many other clunky files that are always breaking. You just need one configuration file build.envd[^1], it works both for local Docker and Kubernetes clusters in the cloud.

envd

[^1]: The build language is starlark, which is a dialect of Python.

✍️ Don't sacrifice your developer experience

SSH is configured for the created environment. You can use vscode-remote, jupyter, pycharm or other IDEs that you love. Besides this, declare the IDE extensions you want, let envd take care of them.

def build():
    install.vscode_extensions([
        "ms-python.python",
    ])

☁️ No polluted environment

Are you working on multiple projects, all of which need different versions of CUDA? envd helps you create isolated and clean environments.

Who should use envd?

We’re focused on helping data scientists and teams that develop AI/ML models. And they may suffer from:

  • building the development environments with Python/R/Julia, CUDA, Docker, SSH, and so on. Do you have a complicated Dockerfile or build script that sets up all your dev environments, but is always breaking?
  • Updating the environment. Do you always need to ask infrastructure engineers how to add a new Python/R/Julia package in the Dockerfile?
  • Managing environments and machines. Do you always forget which machines are used for the specific project, because you handle multiple projects concurrently?

Talk with us

💬 Interested in talking with us about your experience building or managing AI/ML applications?

Set up a time to chat!

Getting Started 🚀

Requirements

  • Docker (20.10.0 or above)

Install and bootstrap envd

envd can be installed with pip (only support Python3). After the installation, please run envd bootstrap to bootstrap.

pip3 install --pre --upgrade envd
envd bootstrap

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(os="ubuntu20.04", language="python3")
    # Configure the pip index if needed.
    # config.pip_index(url = "https://pypi.tuna.tsinghua.edu.cn/simple")
    install.python_packages(name = [
        "numpy",
    ])
    shell("zsh")

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 2.8s ✅ (finished)
 => download oh-my-zsh                                                    2.8s
[+] 🐋 build envd environment 18.3s (25/25) ✅ (finished)
 => create apt source dir                                                 0.0s
 => local://cache-dir                                                     0.1s
 => => transferring cache-dir: 5.12MB                                     0.1s
...
 => pip install numpy                                                    13.0s
 => copy /oh-my-zsh /home/envd/.oh-my-zsh                                 0.1s
 => mkfile /home/envd/install.sh                                          0.0s
 => install oh-my-zsh                                                     0.1s
 => mkfile /home/envd/.zshrc                                              0.0s
 => install shell                                                         0.0s
 => install PyPI packages                                                 0.0s
 => merging all components into one                                       0.3s
 => => merging                                                            0.3s
 => mkfile /home/envd/.gitconfig                                          0.0s
 => exporting to oci image format                                         2.4s
 => => exporting layers                                                   2.0s
 => => exporting manifest sha256:7dbe9494d2a7a39af16d514b997a5a8f08b637f  0.0s
 => => exporting config sha256:1da06b907d53cf8a7312c138c3221e590dedc2717  0.0s
 => => sending tarball                                                    0.4s
envd-quick-start via Py v3.9.13 via 🅒 envd 
⬢ [envd]❯ # You are in the container-based environment!

Set up Jupyter notebook

Please edit the build.envd to enable jupyter notebook:

def build():
    base(os="ubuntu20.04", language="python3")
    # Configure the pip index if needed.
    # config.pip_index(url = "https://pypi.tuna.tsinghua.edu.cn/simple")
    install.python_packages(name = [
        "numpy",
    ])
    shell("zsh")
    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

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.

📖 🎨

Aaron Sun

📓 💻

Aka.Fido

📦 📖 💻

Bingyi Sun

💻

Ce Gao

💻 📖 🎨 📆

Guangyang Li

💻

Gui-Yue

💻

Haiker Sun

💻

Ikko Ashimine

💻

Jian Zeng

🎨 🤔 🔬

Jinjing Zhou

🐛 💻 🎨 📖

Jun

📦 💻

Keming

💻 📖 🤔 🚇

Kevin Su

💻

Ling Jin

🐛 🚇

Manjusaka

💻

Nino

🎨

Pengyu Wang

📖

Sepush

📖

Siyuan Wang

💻 🚇 🚧

Wei Zhang

💻

Xu Jin

💻

Xuanwo

💬 🎨 🤔 👀

Yuan Tang

💻 🎨 📖 🤔

Yuchen Cheng

🐛 🚇 🚧 🔧

Yuedong Wu

💻

Yunchuan Zheng

💻

Zheming Li

💻

Zhenguo.Li

💻 📖

Zhenzhen Zhao

🚇 📓 💻

Zhizhen He

💻 📖

jimoosciuc

📓

kenwoodjw

💻

nullday

🤔 💻

wyq

🐛 🎨 💻

xiangtianyu

📖

xing0821

🤔 📓 💻

zhyon404

💻

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

License 📋

Apache 2.0

trackgit-views

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

envd-0.2.2.tar.gz (227.5 kB view details)

Uploaded Source

Built Distributions

envd-0.2.2-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.6 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

envd-0.2.2-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.6 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

envd-0.2.2-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.6 MB view details)

Uploaded PyPy manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

envd-0.2.2-cp311-cp311-musllinux_1_1_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.11 musllinux: musl 1.1+ x86-64

envd-0.2.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

envd-0.2.2-cp310-cp310-musllinux_1_1_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.10 musllinux: musl 1.1+ x86-64

envd-0.2.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

envd-0.2.2-cp39-cp39-musllinux_1_1_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.9 musllinux: musl 1.1+ x86-64

envd-0.2.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

envd-0.2.2-cp38-cp38-musllinux_1_1_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.8 musllinux: musl 1.1+ x86-64

envd-0.2.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

envd-0.2.2-cp37-cp37m-musllinux_1_1_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.7m musllinux: musl 1.1+ x86-64

envd-0.2.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

envd-0.2.2-cp36-cp36m-musllinux_1_1_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.6m musllinux: musl 1.1+ x86-64

envd-0.2.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (8.6 MB view details)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

File details

Details for the file envd-0.2.2.tar.gz.

File metadata

  • Download URL: envd-0.2.2.tar.gz
  • Upload date:
  • Size: 227.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for envd-0.2.2.tar.gz
Algorithm Hash digest
SHA256 276a13e52c746c544e12042a448c3bec091652b4af84c444100f25958a403275
MD5 23e15cfaff10cf4c1a0492744e86694e
BLAKE2b-256 e11042b25a5254691dff2c606d01503592f308ccfdc0a5729f9d02f9ec366077

See more details on using hashes here.

File details

Details for the file envd-0.2.2-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for envd-0.2.2-pp39-pypy39_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e7a736301abe3de719b2b1a7ab77c503780ba70ab14930816b0b20e4e025b7b4
MD5 d7107221f1030767ea16ead6c64891d7
BLAKE2b-256 116d70a02d9be58bbc714034b849d3bd5e02266f87b5b8d43db1d5a93a71b665

See more details on using hashes here.

File details

Details for the file envd-0.2.2-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for envd-0.2.2-pp38-pypy38_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9900189ab3d5547c05c53d629763932aba82cae8df196386c586769c3191d655
MD5 7a67a51fdd104ada30618d97cfae4b56
BLAKE2b-256 b743608e4de9ad4629590b8d3841bad8f2497df6d3dc7e46ef88bef1c88d1f68

See more details on using hashes here.

File details

Details for the file envd-0.2.2-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for envd-0.2.2-pp37-pypy37_pp73-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ff17ff822f70afdc70fa1b684ac65c840027874ba9ddaa300bf5a13d33c1bde5
MD5 1a21761c90624121c1611056639e7070
BLAKE2b-256 18781448a4d524938042cd6b61ea22b7afb44f850ad261c56df53b0b5907e95e

See more details on using hashes here.

File details

Details for the file envd-0.2.2-cp311-cp311-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for envd-0.2.2-cp311-cp311-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 c5f4cfc651180105d1e26db2c7fc4d29a691faa45d392236f8451e444d54a331
MD5 02f704752efc76d69123e8aa20fbf123
BLAKE2b-256 b477195ea1663efaea2dc6f3e61d30d6b73adcfcec72b9dcc242203ba6ef1d2c

See more details on using hashes here.

File details

Details for the file envd-0.2.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for envd-0.2.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9ae7ba7be21e021590c53acaa425a2df28320f1dfa54dd566cc7f45c871f9fdf
MD5 8cf0f89735acb541ed703a44dfb02523
BLAKE2b-256 4ba6b617efa2ba1d94867cb0f06197a04cbfe8137bb95d517c670f131c6fcb54

See more details on using hashes here.

File details

Details for the file envd-0.2.2-cp310-cp310-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for envd-0.2.2-cp310-cp310-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 910393b617afe0cbd19e216711044cfea11e073d614ac790ef380ef61236ddf7
MD5 ae08c20d188a46a7d7526b67874f7957
BLAKE2b-256 65991131fd0da61fa9e410b7ae1f5f758fe118db6753dea35d7c1b0443e3aafb

See more details on using hashes here.

File details

Details for the file envd-0.2.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for envd-0.2.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dbc38f5f405e1ed306c796f57876952ff1a581a7acf67b3f14b379268ba46123
MD5 f9e83442a29c6d5fc941982c29f322ed
BLAKE2b-256 3898d974f63b45fb514042fe129217d61006438ae8bac405cb8294e19070b7e6

See more details on using hashes here.

File details

Details for the file envd-0.2.2-cp39-cp39-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for envd-0.2.2-cp39-cp39-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 630b41c7bec6eb71916444c2e413b75140820e15018c3adca29e24b189369a46
MD5 b677097edd99dcd73d1c2c54c30f2237
BLAKE2b-256 caa311dcfa30d4adda8257b739157d6deeb5a3ff33abc2e3d97a8beaa2960aee

See more details on using hashes here.

File details

Details for the file envd-0.2.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for envd-0.2.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d09496aab0080b0a462a7f1b998624875ce5a5e5516452ba2b382506d27af086
MD5 ee4a547a284352c7447d3e7a66ef52a3
BLAKE2b-256 8346a292255ba4c969aefe7d0b13d9cfeb901c4db28e37b4f229678763a1a63c

See more details on using hashes here.

File details

Details for the file envd-0.2.2-cp38-cp38-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for envd-0.2.2-cp38-cp38-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 f88a5db7cfe4b424f9769d7b16318a9b467a3d5c32a46e54aa093a8a28c9d3fc
MD5 9c1466a24a2570d53ee94b1f73ad8a06
BLAKE2b-256 279a3a7be8c64bfbedc901cb404916bbab7365264bd9043fa4b8568a4ce72fc4

See more details on using hashes here.

File details

Details for the file envd-0.2.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for envd-0.2.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c1ce9f17cde1dea3e20e20ea78dfa1d008cc0387b1daebf0bddaa728a4ebbcf2
MD5 77447683e763ecf5499566cad10bb39a
BLAKE2b-256 e8d69a09e9e2dd884308faaca997ad40ddc7aa7f46f058a01e15558d582861ac

See more details on using hashes here.

File details

Details for the file envd-0.2.2-cp37-cp37m-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for envd-0.2.2-cp37-cp37m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 08570924458c5bbe4106008744cd62bb7ddb94e5908c29456106132df8ae5adc
MD5 60f5432dd1c29afcb3d8faccac96836c
BLAKE2b-256 a9190498f77a811c68b0fcaede10f6cbb4777eefecea96786d983f35eda07332

See more details on using hashes here.

File details

Details for the file envd-0.2.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for envd-0.2.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8b32386f1afb537ccd40d6366488c107e1ed94db5e2fe1be2032d53e7d1b85ef
MD5 86de8b443f77c10fe239ee2fd53b688e
BLAKE2b-256 073ee1e9aba4a6cecfcb0e0d123c4a78636b43d7e87e44b4bf6150e8dc0e1227

See more details on using hashes here.

File details

Details for the file envd-0.2.2-cp36-cp36m-musllinux_1_1_x86_64.whl.

File metadata

File hashes

Hashes for envd-0.2.2-cp36-cp36m-musllinux_1_1_x86_64.whl
Algorithm Hash digest
SHA256 44a945efbe107ca00d8ff09e72989daadc8ead5968da4d5e605703a79895f35c
MD5 3be15e29a8de69f9906a52645cd081fe
BLAKE2b-256 410b6b7f261101796264305ab974d1c7d02572f7a8ce388478ba7bc09f23fa3f

See more details on using hashes here.

File details

Details for the file envd-0.2.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for envd-0.2.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 2502fb8379a0c5197498d3d1bed4b93cb8d2c66fed46031a306d64ca28dedc7d
MD5 020567761b2270c751ac3faa60ac9bcd
BLAKE2b-256 841db00db90c79c1f9869db3191f5a474409616f525db12f0d83db5ba9a2b454

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page