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
!
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(): install.python_packages(name = [ "numpy", ]) shell("zsh") 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.
<details> <summary><code>envdlib.tensorboard</code> is defined in <a href="https://github.com/tensorchord/envdlib/blob/main/src/monitoring.envd">github.com/tensorchord/envdlib</a></summary>envdlib = include("https://github.com/tensorchord/envdlib") def build(): base(os="ubuntu20.04", language="python") envdlib.tensorboard(host_port=8888)
</details>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")
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 runningenvd bootstrap
, to configure the mirror for docker.io registry:envd bootstrap --dockerhub-mirror https://docker.mirrors.sjtug.sjtu.edu.cn
envd
environmentPlease 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!
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
Note To use the
v1
config file, add# syntax=v1
to the first line of yourbuild.envd
file.
Features | v0 | v1 |
---|---|---|
is default for envd<v1.0 | ✅ | ❌ |
support dev | ✅ | ✅ |
support CUDA | ✅ | ✅ |
support serving | ⚠️ | ✅ |
support custom base image | ⚠️ | ✅ |
support installing multiple languages | ⚠️ | ✅ |
support moby builder | ❌ | ✅ <sup>(a)</sup> |
Note <a name="v1-moby">(a)</a> To use the
moby
builder, you will need to create a new context withenvd context create --name moby-test --builder moby-worker --use
. For more information about themoby
builder, check the issue-1693.
Important For more details, check the upgrade to v1 doc.
See envd documentation.
Please checkout ROADMAP.
We welcome all kinds of contributions from the open-source community, individuals, and partners.
Thanks goes to these wonderful people (emoji key):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> <table> <tbody> <tr> <td align="center" valign="top" width="14.28%"><a href="http://blog.duanfei.org"><img src="https://avatars.githubusercontent.com/u/16186646?v=4?s=70" width="70px;" alt=" Friends A."/><br /><sub><b> Friends A.</b></sub></a><br /><a href="https://github.com/tensorchord/envd/commits?author=shaonianche" title="Documentation">📖</a> <a href="#design-shaonianche" title="Design">🎨</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/aaronzs"><img src="https://avatars.githubusercontent.com/u/1827365?v=4?s=70" width="70px;" alt="Aaron Sun"/><br /><sub><b>Aaron Sun</b></sub></a><br /><a href="#userTesting-aaronzs" title="User Testing">📓</a> <a href="https://github.com/tensorchord/envd/commits?author=aaronzs" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/popfido"><img src="https://avatars.githubusercontent.com/u/3928409?v=4?s=70" width="70px;" alt="Aka.Fido"/><br /><sub><b>Aka.Fido</b></sub></a><br /><a href="#platform-popfido" title="Packaging/porting to new platform">📦</a> <a href="https://github.com/tensorchord/envd/commits?author=popfido" title="Documentation">📖</a> <a href="https://github.com/tensorchord/envd/commits?author=popfido" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="http://alexhxi.com"><img src="https://avatars.githubusercontent.com/u/68758451?v=4?s=70" width="70px;" alt="Alex Xi"/><br /><sub><b>Alex Xi</b></sub></a><br /><a href="https://github.com/tensorchord/envd/commits?author=AlexXi19" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a href="https://github.com/LuBingtan"><img src="https://avatars.githubusercontent.com/u/30698342?v=4?s=70" width="70px;" alt="Bingtan Lu"/><br /><sub><b>Bingtan Lu</b></sub></a><br /><a href="https://github.com/tensorchord/envd/commits?author=LuBingtan" title="Code">💻</a></td> <td align="center" valign="top" width="14.28%"><a一键生成PPT和Word,让学习生活更轻松
讯飞智文是一个利用 AI 技术的项目,能够帮助用户生成 PPT 以及各类文档。无论是商业领域的市场分析报告、年度目标制定,还是学生群体的职业生涯规划、实习避坑指南,亦或是活动策划、旅游攻略等内容,它都能提供支持,帮助用户精准表达,轻松呈现各种信息。
深度推理能力全新升级,全面对标OpenAI o1
科大讯飞的星火大模型,支持语言理解、知识问答和文本创作等多功能,适用于多种文件和业务场景,提升办公和日常生活的效率。讯飞星火是一个提供丰富智能服务的平台,涵盖科技资讯、图像创作、写作辅助、编程解答、科研文献解读等功能,能为不同需求的用户提供便捷高效的帮助,助力用户轻松获取信息、解决问题,满足多样化使用场景。
一种基于大语言模型的高效单流解耦语音令牌文本到语音合成模型
Spark-TTS 是一个基于 PyTorch 的开源文本到语音合成项目,由多个知名机构联合参与。该项目提供了高效的 LLM(大语言模型)驱动的语音合成方案,支持语音克隆和语音创建功能,可通过命令行界面(CLI)和 Web UI 两种方式使用。用户可以根据需求调整语音的性别、音高、速度等参数,生成高质量的语音。该项目适用于多种场景,如有声读物制作、智能语音助手开发等。
字节跳动发布的AI编程神器IDE
Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。
AI助力,做PPT更简单!
咔片是一款轻量化在线演示设计工具,借助 AI 技术,实现从内容生成到智能设计的一站式 PPT 制作服务。支持多种文档格式导入生成 PPT,提供海量模板、智能美化、素材替换等功能,适用于销售、教师、学生等各类人群,能高效制作出高品质 PPT,满足不同场景演示需求。
选题、配图、成文,一站式创作,让内容运营更高效
讯飞绘文,一个AI集成平台,支持写作、选题、配图、排版和发布。高效生成适用于各类媒体的定制内容,加速品牌传播 ,提升内容营销效果。
专业的AI公文写作平台,公文写作神器
AI 材料星,专业的 AI 公文写作辅助平台,为体制内工作人员提供高效的公文写作解决方案。拥有海量公文文库、9 大核心 AI 功能,支持 30 + 文稿类型生成,助力快速完成领导讲话、工作总结、述职报告等材料,提升办公效率,是体制打工人的得力写作神器。
OpenAI Agents SDK,助力开发者便捷使用 OpenAI 相关功能。
openai-agents-python 是 OpenAI 推出的一款强大 Python SDK,它为开发者提供了与 OpenAI 模型交互的高效工具,支持工具调用、结果处理、追踪等功能,涵盖多种应用场景,如研究助手、财务研究等,能显著提升开发效率,让开发者更轻松地利用 OpenAI 的技术优势。
高分辨率纹理 3D 资产生成
Hunyuan3D-2 是腾讯开发的用于 3D 资产生成的强大工具,支持从文本描述、单张图片或多视角图片生成 3D 模型,具备快速形状生成能力,可生成带纹理的高质量 3D 模型,适用于多个领域,为 3D 创作提供了高效解决方案。
一个具备存储、管理和客户端操作等多种功能的分布式文件系统相关项目。
3FS 是一个功能强大的分布式文件系统项目,涵盖了存储引擎、元数据管理、客户端工具等多个模块。它支持多种文件操作,如创建文件和目录、设置布局等,同时具备高效的事件循环、节点选择和协程池管理等特性。适用于需要大规模数据存储和管理的场景,能够提高系统的性能和可靠性,是分布式存储领域的优质解决方案。
最新AI工具、AI资讯
独家AI资源、AI项目落地
微信扫一扫关注公众号