From 4da4825671f3cbb605dabde4c76fac876900c30d Mon Sep 17 00:00:00 2001 From: Jeff Wang Date: Mon, 5 Feb 2018 16:00:06 -0800 Subject: [PATCH] Provide instructions on virtualenv. (#258) * Provide instructions on virtualenv. * Clean up the detail a little bit. --- README.cn.md | 6 ++++-- README.md | 6 ++++-- docs/contribute_code_cn.md | 16 ++++++++++++++++ docs/contribute_code_en.md | 18 ++++++++++++++++++ 4 files changed, 42 insertions(+), 4 deletions(-) diff --git a/README.cn.md b/README.cn.md index 067a40d2..7ab9914c 100644 --- a/README.cn.md +++ b/README.cn.md @@ -55,11 +55,13 @@ VisualDL 目前支持4种组件:

## 快速尝试 +请使用下面的命令,来快速测试 VisualDL。 + ``` -# 安装 +# 安装,建議是在虛擬環境下。 pip install --upgrade visualdl -# 运行一个例子 +# 运行一个例子,vdl_scratch.py将创建测试日志 vdl_scratch.py visualDL --logdir=scratch_log --port=8080 diff --git a/README.md b/README.md index d39555f1..ef83827e 100644 --- a/README.md +++ b/README.md @@ -62,11 +62,13 @@ Histogram can be used to visualize parameter distribution and trends for any ten

## 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 diff --git a/docs/contribute_code_cn.md b/docs/contribute_code_cn.md index 2155c474..54112d42 100644 --- a/docs/contribute_code_cn.md +++ b/docs/contribute_code_cn.md @@ -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 diff --git a/docs/contribute_code_en.md b/docs/contribute_code_en.md index d22ca0cb..4cf32d88 100644 --- a/docs/contribute_code_en.md +++ b/docs/contribute_code_en.md @@ -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: -- GitLab