-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: highlight the example code (#1748)
Signed-off-by: Keming <[email protected]>
- Loading branch information
Showing
8 changed files
with
30 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,7 +51,7 @@ def run(commands: List[str], mount_host: bool = False): | |
Enabling this will disable the build cache for this operation. | ||
Example: | ||
``` | ||
```python | ||
run(commands=["conda install -y -c conda-forge exa"]) | ||
``` | ||
""" | ||
|
@@ -70,7 +70,7 @@ def git_config( | |
editor (optional, str): Editor for git operations | ||
Example usage: | ||
``` | ||
```python | ||
git_config(name="My Name", email="[email protected]", editor="vim") | ||
``` | ||
""" | ||
|
@@ -86,7 +86,7 @@ def include(git: str): | |
git (str): git URL | ||
Example usage: | ||
``` | ||
```python | ||
envd = include("https://github.com/tensorchord/envdlib") | ||
def build(): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ def command(commands: Dict[str, str]): | |
commands (Dict[str, str]): map name to command, similar to Makefile | ||
Example usage: | ||
``` | ||
```python | ||
runtime.command(commands={ | ||
"train": "python train.py --epoch 20 --notify [email protected]", | ||
"run": "python server.py --batch 1 --host 0.0.0.0 --port 8000", | ||
|
@@ -73,7 +73,7 @@ def daemon(commands: List[List[str]]): | |
commands (List[List[str]]): run multiple commands in the background | ||
Example usage: | ||
``` | ||
```python | ||
runtime.daemon(commands=[ | ||
["jupyter-lab", "--port", "8080"], | ||
["python3", "serving.py", ">>serving.log", "2>&1"], | ||
|
@@ -90,7 +90,7 @@ def environ(env: Dict[str, str], extra_path: List[str]): | |
extra_path (List[str]): additional PATH | ||
Example usage: | ||
``` | ||
```python | ||
runtime.environ(env={"ENVD_MODE": "DEV"}, extra_path=["/usr/bin/go/bin"]) | ||
``` | ||
""" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,7 +60,7 @@ def run(commands: List[str], mount_host: bool = False): | |
Enabling this will disable the build cache for this operation. | ||
Example: | ||
``` | ||
```python | ||
run(commands=["conda install -y -c conda-forge exa"]) | ||
``` | ||
""" | ||
|
@@ -71,15 +71,15 @@ def git_config( | |
email: Optional[str] = None, | ||
editor: Optional[str] = None, | ||
): | ||
"""Setup git config | ||
"""Setup git config. | ||
Args: | ||
name (str): User name | ||
email (str): User email | ||
editor (str): Editor for git operations | ||
Example usage: | ||
``` | ||
```python | ||
git_config(name="My Name", email="[email protected]", editor="vim") | ||
``` | ||
""" | ||
|
@@ -95,7 +95,7 @@ def include(git: str): | |
git (str): git URL | ||
Example usage: | ||
``` | ||
```python | ||
envd = include("https://github.com/tensorchord/envdlib") | ||
def build(): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ def command(commands: Dict[str, str]): | |
commands (Dict[str, str]): map name to command, similar to Makefile | ||
Example usage: | ||
``` | ||
```python | ||
runtime.command(commands={ | ||
"train": "python train.py --epoch 20 --notify [email protected]", | ||
"run": "python server.py --batch 1 --host 0.0.0.0 --port 8000", | ||
|
@@ -79,7 +79,7 @@ def daemon(commands: List[List[str]]): | |
commands (List[List[str]]): run multiple commands in the background | ||
Example usage: | ||
``` | ||
```python | ||
runtime.daemon(commands=[ | ||
["jupyter-lab", "--port", "8080"], | ||
["python3", "serving.py", ">>serving.log", "2>&1"], | ||
|
@@ -96,7 +96,7 @@ def environ(env: Dict[str, str], extra_path: List[str]): | |
extra_path (List[str]): additional PATH | ||
Example usage: | ||
``` | ||
```python | ||
runtime.environ(env={"ENVD_MODE": "DEV"}, extra_path=["/usr/bin/go/bin"]) | ||
``` | ||
""" | ||
|