Skip to content

Commit

Permalink
Provide instructions on virtualenv. (#258)
Browse files Browse the repository at this point in the history
* Provide instructions on virtualenv.

* Clean up the detail a little bit.
  • Loading branch information
jetfuel authored Feb 6, 2018
1 parent 13cc819 commit 4da4825
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 4 deletions.
6 changes: 4 additions & 2 deletions README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ VisualDL 目前支持4种组件:
</p>

## 快速尝试
请使用下面的命令,来快速测试 VisualDL。

```
# 安装
# 安装,建議是在虛擬環境下。
pip install --upgrade visualdl
# 运行一个例子
# 运行一个例子,vdl_scratch.py将创建测试日志
vdl_scratch.py
visualDL --logdir=scratch_log --port=8080
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,13 @@ Histogram can be used to visualize parameter distribution and trends for any ten
</p>

## 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
# run a demo
# run a demo, vdl_scratch.py will create logs for testing.
vdl_scratch.py
visualDL --logdir=scratch_log --port=8080
Expand Down
16 changes: 16 additions & 0 deletions docs/contribute_code_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,22 @@ VisualDL 目前使用[Git流分支模型](http://nvie.com/posts/a-successful-git
```bash
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

Expand Down
18 changes: 18 additions & 0 deletions docs/contribute_code_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,24 @@ VisualDL uses this [Git branching model](http://nvie.com/posts/a-successful-git-
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

Before issuing your first `git commit` command, please install [`pre-commit`](http://pre-commit.com/) and other requirements by running the following commands:
Expand Down

0 comments on commit 4da4825

Please sign in to comment.