未验证 提交 4da48256 编写于 作者: J Jeff Wang 提交者: GitHub

Provide instructions on virtualenv. (#258)

* Provide instructions on virtualenv.

* Clean up the detail a little bit.
上级 13cc8198
...@@ -55,11 +55,13 @@ VisualDL 目前支持4种组件: ...@@ -55,11 +55,13 @@ VisualDL 目前支持4种组件:
</p> </p>
## 快速尝试 ## 快速尝试
请使用下面的命令,来快速测试 VisualDL。
``` ```
# 安装 # 安装,建議是在虛擬環境下。
pip install --upgrade visualdl pip install --upgrade visualdl
# 运行一个例子 # 运行一个例子,vdl_scratch.py将创建测试日志
vdl_scratch.py vdl_scratch.py
visualDL --logdir=scratch_log --port=8080 visualDL --logdir=scratch_log --port=8080
......
...@@ -62,11 +62,13 @@ Histogram can be used to visualize parameter distribution and trends for any ten ...@@ -62,11 +62,13 @@ Histogram can be used to visualize parameter distribution and trends for any ten
</p> </p>
## Quick Start ## Quick Start
To give the VisualDL a quick test, please use the following commands.
``` ```
# install # Install the VisualDL. Preferably under a virtual environment.
pip install --upgrade visualdl pip install --upgrade visualdl
# run a demo # run a demo, vdl_scratch.py will create logs for testing.
vdl_scratch.py vdl_scratch.py
visualDL --logdir=scratch_log --port=8080 visualDL --logdir=scratch_log --port=8080
......
...@@ -27,6 +27,22 @@ VisualDL 目前使用[Git流分支模型](http://nvie.com/posts/a-successful-git ...@@ -27,6 +27,22 @@ VisualDL 目前使用[Git流分支模型](http://nvie.com/posts/a-successful-git
```bash ```bash
git checkout -b my-cool-stuff git checkout -b my-cool-stuff
``` ```
1. Virtualenv
virtualenv是一个独立的Python虚拟环境。我们强烈建议您使用` virtualenv `来保持你的Python环境清洁。
要创建虚拟环境并激活它,请使用以下命令。
```bash
pip install --upgrade virtualenv
virtualenv YOUR_VIRTUAL_EVN_FOLDER
source YOUR_VIRTUAL_EVN_FOLDER/bin/activate
```
完成此工作后,可以通过操作来解除虚拟环境。
```bash
deactivate
```
要了解更多关于` virtualenv `,点击[这里](https://virtualenv.pypa.io/en/stable/)
1. commit 1. commit
......
...@@ -29,6 +29,24 @@ VisualDL uses this [Git branching model](http://nvie.com/posts/a-successful-git- ...@@ -29,6 +29,24 @@ VisualDL uses this [Git branching model](http://nvie.com/posts/a-successful-git-
git checkout -b my-cool-stuff git checkout -b my-cool-stuff
``` ```
1. Virtualenv
VirtualEnv is an isolated virtual environment for Python. We highly recommend using `virtualenv` to keep your python environment clean.
To create a virtual environment and activate it, please use the following commands.
```bash
pip install --upgrade virtualenv
virtualenv YOUR_VIRTUAL_EVN_FOLDER
source YOUR_VIRTUAL_EVN_FOLDER/bin/activate
```
When you are done with the work, you can deactivate the virtual environment by doing.
```bash
deactivate
```
To learn more about `virtualenv`, click [here](https://virtualenv.pypa.io/en/stable/)
1. Commit 1. Commit
Before issuing your first `git commit` command, please install [`pre-commit`](http://pre-commit.com/) and other requirements by running the following commands: Before issuing your first `git commit` command, please install [`pre-commit`](http://pre-commit.com/) and other requirements by running the following commands:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册