Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide instructions on virtualenv. #258

Merged
merged 2 commits into from
Feb 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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将创建测试日志

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

运行一个例子?

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.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So instead of this, why don't we just give them a simple command "virtualenv venv; source venv/bin/activate`. This requires them to go read another doc and figure out how virtualenv works. What do you think?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah just saw your stuff for contrib. I'd just add those lines here too and avoid the confusiuon.


```
# 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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes yes yes!!

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