Skip to content

Commit 0c84b13

Browse files
committed
[Doc] Update installation doc
1 parent 8013eab commit 0c84b13

File tree

5 files changed

+157
-14
lines changed

5 files changed

+157
-14
lines changed

README.md

+2-5
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,6 @@ Currently, GammaGL requires **Python Version >= 3.9**.
163163
$ python setup.py install
164164
```
165165

166-
or directly use the stable version:
167-
168-
```bash
169-
$ pip install gammagl
170-
```
171166
> 大陆用户如果遇到网络问题,推荐从启智社区安装
172167
>
173168
> Try to git clone from OpenI
@@ -179,6 +174,8 @@ Currently, GammaGL requires **Python Version >= 3.9**.
179174
>
180175
> `git submodule update --init`
181176
177+
You may also download the stable version refer to our [document](https://gammagl.readthedocs.io/en/latest/notes/installation.html).
178+
182179
## Quick Tour for New Users
183180

184181
In this quick tour, we highlight the ease of creating and training a GNN model with only a few lines of code.

docs/requirements.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ sphinx-markdown-tables
44
sphinx-intl
55
recommonmark
66
sphinx_copybutton==0.4.0
7-
numpy<=1.23
7+
numpy
88
scipy
99
tensorflow<=2.11.0
1010
torch
@@ -14,5 +14,5 @@ tensorlayerx==0.5.8
1414
pytest
1515
pyparsing
1616
pybind11
17-
pybind11
18-
pandas==2.0.3
17+
pandas
18+
nbsphinx

docs/source/notes/installation.rst

+12-4
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,26 @@ System requrements
66
GammaGL works with the following operating systems:
77

88
* Linux
9-
* Windows
9+
* Windows (Currently, we only support python 3.9, pytorch 2.1 and CPU on Windows)
1010

11-
GammaGL requires Python version 3.9 or 3.10(partially).
11+
GammaGL requires Python version 3.9, 3.10, 3.11.
1212

1313
Backend
1414
-------
1515

1616
- `tensorflow <https://www.tensorflow.org/api_docs/>`_ : We recommend tensorflow version under 2.12.0
17-
- `pytorch <https://pytorch.org/get-started/locally/>`_ : Support version from 1.9 to 2.1
17+
- `pytorch <https://pytorch.org/get-started/locally/>`_ : Support version from 1.9 to 2.1, the defalut backend
1818
- `paddlepaddle <https://www.paddlepaddle.org.cn/>`_ : We recommend paddlepaddle version under 2.3.2
1919
- `mindspore <https://www.mindspore.cn/install>`_ : Support version to 2.2.10
2020

21+
Quick Start with PyTorch
22+
------------------------
23+
24+
.. raw:: html
25+
:file: quick-start.html
26+
27+
If you choose the other backend, you can directly install gammagl with `pip install gammagl`.
28+
2129
Install from pip
2230
----------------
2331

@@ -51,7 +59,7 @@ Install from pip
5159
**3. GammaGL:** Install `GammaGL <https://github.com/BUPT-GAMMA/GammaGL>`_ and its dependencies.
5260

5361
.. code:: bash
54-
62+
5563
pip install gammgl
5664
5765
Install from source

docs/source/notes/quick-start.html

+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
2+
<style>
3+
.quick-start {
4+
display: flex;
5+
flex-direction: row;
6+
flex-wrap: nowrap;
7+
margin-bottom: 20px;
8+
}
9+
10+
.title-column {
11+
flex-grow: 0;
12+
}
13+
14+
.content-column {
15+
flex-grow: 1;
16+
}
17+
18+
.row {
19+
display: flex;
20+
flex-direction: row;
21+
flex-wrap: nowrap;
22+
}
23+
24+
.title-column div, .row div {
25+
white-space: nowrap;
26+
}
27+
28+
.title-column div {
29+
padding: 14px 10px 12px 0;
30+
font-weight: 700;
31+
}
32+
33+
.row div {
34+
flex-grow: 1;
35+
text-align: center;
36+
margin: 2px;
37+
padding: 12px 0 10px 0;
38+
background: #e3e3e3;
39+
cursor: pointer;
40+
}
41+
42+
.row div.selected {
43+
background: rgba(59,155,239,0.7);
44+
color: #ffffff;
45+
}
46+
47+
#command {
48+
margin: 2px;
49+
padding: 12px 10px 10px 10px;
50+
}
51+
52+
#command pre {
53+
padding: 0;
54+
margin: 0;
55+
white-space: pre-wrap;
56+
}
57+
58+
</style>
59+
60+
<div class="quick-start">
61+
<div class="title-column">
62+
<div>PyTorch</div>
63+
<div>Your OS</div>
64+
<div>CUDA</div>
65+
<div>Run:</div>
66+
</div>
67+
<div class="content-column">
68+
<div class="row" id="torch"></div>
69+
<div class="row" id="os"></div>
70+
<div class="row" id="cuda"></div>
71+
<div class="row" id="command"><pre></pre></div>
72+
</div>
73+
</div>
74+
75+
<script>
76+
var torchList = [
77+
['pt21', 'PyTorch 2.1.*'],
78+
['pt20', 'PyTorch 2.0.*'],
79+
['pt113', 'PyTorch 1.13.*'],
80+
];
81+
82+
var osList = [
83+
['linux', 'Linux'],
84+
['windows', 'Windows'],
85+
];
86+
87+
var cudaList = [
88+
['post116', '11.6'],
89+
['post118', '11.8'],
90+
['cpu', 'CPU'],
91+
];
92+
93+
torchList.forEach(x => $("#torch").append(`<div id="${x[0]}">${x[1]}</div>`));
94+
osList.forEach(x => $("#os").append(`<div id="${x[0]}">${x[1]}</div>`));
95+
cudaList.forEach(x => $("#cuda").append(`<div id="${x[0]}">${x[1]}</div>`));
96+
97+
function updateCommand() {
98+
var torch = $("#command").attr("torch");
99+
var os = $("#command").attr("os");
100+
var cuda = $("#command").attr("cuda");
101+
102+
if (os == "windows" && torch != "pt21" && cuda != "cpu") {
103+
$("#command pre").text('# Currently, we only support PyTorch 2.1.* and CPU on Windows');
104+
}
105+
106+
else if (torch == "pt20" && cuda == "post116") {
107+
$("#command pre").text('# PyTorch 2.0.* binaries do not support CUDA 11.6');
108+
}
109+
110+
else if (torch == "pt21" && cuda == "post116") {
111+
$("#command pre").text('# PyTorch 2.1.* binaries do not support CUDA 11.6');
112+
}
113+
114+
else if (torch == "pt113" && cuda == "post118") {
115+
$("#command pre").text('# PyTorch 1.13.* binaries do not support CUDA 11.8');
116+
}
117+
118+
else if (cuda == "cpu") {
119+
$("#command pre").text(`pip install gammag-${$("#command").attr("torch")}==0.4.0`);
120+
}
121+
122+
else {
123+
$("#command pre").text(`pip install gammag-${$("#command").attr("torch")}==0.4.0.${$("#command").attr("cuda")}`);
124+
}
125+
}
126+
127+
$(".quick-start .content-column .row div").click(function() {
128+
$(this).parent().children().removeClass("selected");
129+
$(this).addClass("selected");
130+
$("#command").attr($(this).parent().attr("id"), $(this).attr("id"));
131+
updateCommand();
132+
});
133+
134+
$("#torch").children().get(0).click();
135+
$("#linux").click();
136+
$("#cpu").click();
137+
138+
</script>

requirements.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
numpy<=1.23
1+
numpy
22
scipy
33
pybind11
4-
tensorflow
4+
torch
55
git+https://github.com/tensorlayer/tensorlayerx.git
66
pytest
77
tqdm

0 commit comments

Comments
 (0)