diff --git a/README.md b/README.md index 0b4815239b1..d18d56420b2 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ## Quick Start -### Interactive Mode +### Basic Setup 1. Install Python and packages @@ -10,31 +10,39 @@ Note: Python 3.5+ is required. Install packages dicttoxml gitpython lxml networkx numpy openpyxl statistics scipy matplotlib: -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 . -E.g., on Ubuntu: +E.g., on Ubuntu LTS 16.04: ``` sudo -H pip3 install --upgrade pip sudo -H pip3 install jupyter @@ -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. @@ -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: @@ -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". +