Skip to content

Commit

Permalink
Reorganize README
Browse files Browse the repository at this point in the history
  • Loading branch information
hezyin committed Jun 1, 2018
1 parent 44667b2 commit 77134f8
Showing 1 changed file with 29 additions and 20 deletions.
49 changes: 29 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

## Quick Start

### Interactive Mode
### Basic Setup

1. Install Python and packages

Expand All @@ -10,31 +10,39 @@ Note: Python 3.5+ is required.

Install packages dicttoxml gitpython lxml networkx numpy openpyxl statistics scipy matplotlib: <https://packaging.python.org/installing/>

E.g., on Ubuntu:
E.g., on Ubuntu LTS 16.04:
```
sudo apt update
sudo apt install -y python3 python3-pip
sudo -H pip3 install dicttoxml gitpython lxml networkx numpy openpyxl statistics scipy matplotlib
```

2. Update Git

In order to uset the `--indent-heuristic` option of `git diff`, we require git version >= 2.11. Use the following commands to upgrade:
```
git --version
sudo add-apt-repository ppa:git-core/ppa -y
sudo apt-get update
sudo apt-get install git -y
git --version
```

3. Apply a patch to gitpython

(Try to) apply a patch to gitpython 2.1.x:
```
cd misc/
./apply_patch.py
```

2. Install Jupyter
### Interactive Mode

1. Install Jupyter

Reference <http://jupyter.org/install.html>.

E.g., on Ubuntu:
E.g., on Ubuntu LTS 16.04:
```
sudo -H pip3 install --upgrade pip
sudo -H pip3 install jupyter
Expand All @@ -46,21 +54,7 @@ sudo apt install -y jq
./gitconfig.sh
```

3. Install TensorFlow

Follow this tutorial: https://www.tensorflow.org/install/install_sources.

An example build:

```
bazel build --config=opt --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-msse4.1 --copt=-msse4.2 //tensorflow/tools/pip_package:build_pip_package
```

When running TensorFlow, get out of the tensorflow source dir. Otherwise,
python would prompt an error message "No module named
pywrap_tensorflow_internal".

4. Run a notebook
2. Run a notebook

All notebooks should be run in the root dir of this project.

Expand All @@ -73,7 +67,7 @@ Enjoy your interactions with the notebook!

### Batch Mode

Do the above Step 1 and Step 2.
Complete the basic setup first.
Note: setup-linux-ubuntu.sh can be used for Ubuntu Server.

Read help info of dev_analysis.py:
Expand All @@ -95,3 +89,18 @@ A sample long-time run:
```
nohup ./dev_analysis.py -s ./repos/linux/ -x ./repos/linux-4.10-xml/ -o linux-4.10-cc.xlsx -n 1000 10000 -a 0 1 0.05 -c > dev.out 2>&1 &
```

### Install TensorFlow

Follow this tutorial: https://www.tensorflow.org/install/install_sources.

An example build:

```
bazel build --config=opt --copt=-mavx --copt=-mavx2 --copt=-mfma --copt=-msse4.1 --copt=-msse4.2 //tensorflow/tools/pip_package:build_pip_package
```

When running TensorFlow, get out of the tensorflow source dir. Otherwise,
python would prompt an error message "No module named
pywrap_tensorflow_internal".

0 comments on commit 77134f8

Please sign in to comment.