pip install graph-learn
Let's take Ubuntu 16.04
based on g++ 5.4.0
as an example to illustrate the steps of compiling the source code.
sudo apt-get install git-all autoconf automake libtool libssl-dev cmake python-numpy python-setuptools python-pip
git clone https://github.com/alibaba/graph-learn.git
cd graph-learn
git submodule update --init
Next, the entire project and test cases can be compiled in two ways.
- use Makefile(recommended):
make test
- Use CMakeLists.txt:
mkdir cmake-build && cd cmake-build
cmake -DTESTING=ON .. && make
build python package:
make python
If you need to execute a specific python bin, such as specifying compilation with python 3.7, then execute:
make python PYTHON=python3.7
sudo pip install dist/your_wheel_name.whl
The TensorFlow model example provided by GL is developed based on TensorFlow 1.13 and requires the installation of the corresponding version of the library.
sudo pip install tensorflow==1.13.0
The PyTorch model example provided by GL is based on PyG development and requires the installation of the corresponding library.
sudo pip install pytorch
# Install PyG follow the doc: https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html
source env.sh
./test_cpp_ut.sh
./test_python_ut.sh
We provide a graphlearn image with the corresponding version of graphlearn pre-installed. Depending on the needs of algorithm development, we provide pre-installed images of Tensorflow 1.13.0rc1 and Pytorch 1.8.1+PyG, respectively. You can quickly start GraphLearn in the Docker image.
- Tensorflow1.13.0rc1, CPU
docker pull graphlearn/graphlearn:1.0.0-tensorflow1.13.0rc1-cpu
# or, pull the latest graphlearn with 1.0.0-tensorflow1.13.0rc1-cpu
docker pull graphlearn/graphlearn:latest
# or, pull the given version graphlearn with 1.0.0-tensorflow1.13.0rc1-cpu
docker pull graphlearn/graphlearn:1.0.0
- PyTorch1.8.1, Cuda10.2, cdnn7, with PyG
docker pull graphlearn/graphlearn:1.0.0-torch1.8.1-cuda10.2-cudnn7