Skip to content

Commit

Permalink
docs: change to v1 in readme (#1968)
Browse files Browse the repository at this point in the history
Signed-off-by: Keming <[email protected]>
  • Loading branch information
kemingy authored Feb 6, 2025
1 parent f747827 commit ab9be80
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 36 deletions.
80 changes: 45 additions & 35 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,13 @@ Environments built with `envd` provide the following features out-of-the-box:

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

Expand Down Expand Up @@ -92,7 +95,9 @@ Forget copy-pasting Dockerfile instructions - use envd to easily build functions
envdlib = include("https://github.com/tensorchord/envdlib")

def build():
base(os="ubuntu22.04", language="python")
base(dev=True)
install.conda()
install.python()
envdlib.tensorboard(host_port=8888)
```

Expand Down Expand Up @@ -176,13 +181,15 @@ The build manifest `build.envd` looks like:

```python title=build.envd
def build():
base(os="ubuntu22.04", language="python3")
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("zsh")
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](https://github.com/tensorchord/envd/tree/main/examples).*
Expand All @@ -195,29 +202,34 @@ cd envd-quick-start && envd up

```bash
$ 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
[+] ⌚ 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!
```

Expand All @@ -227,13 +239,15 @@ Please edit the `build.envd` to enable jupyter notebook:

```python title=build.envd
def build():
base(os="ubuntu22.04", language="python3")
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("zsh")
shell("fish")
config.jupyter()
```

Expand All @@ -249,7 +263,7 @@ envd-quick-start http://localhost:42779 envd-quick-start.envd /home/g
## Difference between v0 and v1

> [!NOTE]
> To use the `v1` config file, add `# syntax=v1` to the first line of your `build.envd` file.
> Start from `envd v1.0`, `v1` syntax is the default syntax for `build.envd` file.
| Features | v0 | v1 |
| --- | --- | --- |
Expand All @@ -259,11 +273,7 @@ envd-quick-start http://localhost:42779 envd-quick-start.envd /home/g
| support serving | ⚠️ ||
| support custom base image | ⚠️ ||
| support installing multiple languages | ⚠️ ||
| support `moby` builder || ✅ <sup>[(a)](#v1-moby)</sup> |

> [!NOTE]
> <a name="v1-moby">(a)</a> To use the `moby` builder, you will need to create a new context with `envd context create --name moby-test --builder moby-worker --use`.
> For more information about the `moby` builder, check the [issue-1693](https://github.com/tensorchord/envd/issues/1693).
| support `moby` builder |||

> [!IMPORTANT]
> For more details, check the [upgrade to v1](https://envd.tensorchord.ai/guide/v1.html) doc.
Expand Down
2 changes: 1 addition & 1 deletion e2e/docs/testdata/complex/build.envd
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

def build():
base(dev=True)
install.cuda(version="12.3.2", cudnn="9")
install.cuda(version="11.8.0", cudnn="8")
install.conda()
install.python()
config.apt_source(
Expand Down

0 comments on commit ab9be80

Please sign in to comment.