-
Notifications
You must be signed in to change notification settings - Fork 2
/
INSTALL
103 lines (63 loc) · 2.26 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
GraVF requires:
- Python 3.6 with:
- Migen (https://github.com/m-labs/migen)
- NetworkX (https://networkx.github.io/)
And optionally:
- Metis (http://glaros.dtc.umn.edu/gkhome/metis/metis/overview)
- NetworkX-METIS (https://networkx-metis.readthedocs.io)
- repository 'util' (https://github.com/nakengelhardt/util) (now a git submodule)
It is recommended to use pyenv to manage python environments. (https://github.com/pyenv/pyenv)
Quick solution: pip install -r requirements.txt
Detailed installation instructions for Ubuntu:
Pyenv:
- get prerequisites
$ sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev
- get pyenv
$ git clone https://github.com/pyenv/pyenv.git ~/.pyenv
- set up pyenv
$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
$ echo -e 'if command -v pyenv 1>/dev/null 2>&1; then\n eval "$(pyenv init -)"\nfi' >> ~/.bashrc
- restart shell
$ exec "$SHELL"
- get python version
$ pyenv install 3.6.15
- set local python version for GraVF
$ cd <...>/fpgagraphlib
$ pyenv local 3.6
Migen:
- get migen
$ git clone https://github.com/m-labs/migen ~/migen
- set up migen
$ echo 'export PYTHONPATH="$HOME/migen:$PYTHONPATH"' >> ~/.bashrc
NetworkX:
- use pip within a folder where python-version is declared to be 3.6 (e.g. fpgagraphlib)
- (to check, type pyenv version)
$ pip install networkx
METIS:
- get METIS
$ curl -O http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/metis-5.1.0.tar.gz
$ tar xzf metis-5.1.0.tar.gz
$ cd metis-5.1.0/
- build with shared option
$ make config shared=1
$ cd build/Linux-x86_64
$ make
$ sudo make install
NetworkX-METIS:
- If it works, use pip within a folder where python-version is declared to be 3.6 (e.g. fpgagraphlib)
- (to check, type pyenv version)
$ pip install networkx-metis
- If PyPI release is still broken, install from source:
( prerequisite: pip install cython )
$ git clone https://github.com/networkx/networkx-metis.git
$ cd networkx-metis
$ pyenv local 3.6
$ pip install -e .
other dependencies:
$ pip install numpy
$ pip install tabulate
util:
$ git submodule update --init --recursive