Skip to content

Commit

Permalink
Merge branch 'master' into node2vec
Browse files Browse the repository at this point in the history
  • Loading branch information
AntiTopQuark authored Dec 20, 2024
2 parents 4b8f5fa + cc68bcf commit df138f9
Show file tree
Hide file tree
Showing 3,501 changed files with 460,269 additions and 75 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
26 changes: 26 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build and Deploy
on: [push]
permissions:
contents: write
jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4

- name: Install Pandoc
run: sudo apt-get update && sudo apt-get install -y pandoc && pandoc --version

- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
run: |
export NODE_OPTIONS="--max_old_space_size=8192"
cd docs/docusaurus
yarn install
yarn build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: docs/docusaurus/build # The folder the action should deploy.
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,15 @@ set(DEPS_LOCAL_LIBRARY_DIR /usr/local/lib)

include_directories(SYSTEM ${DEPS_INCLUDE_DIR} ${DEPS_LOCAL_INCLUDE_DIR}) # just for IDE
link_directories(${DEPS_LIBRARY_DIR} ${DEPS_LIBRARY64_DIR})
if (OURSYSTEM STREQUAL "centos")
if (OURSYSTEM MATCHES "^centos")
if (OURSYSTEM STREQUAL "centos9")
add_compile_definitions(USING_CENTOS9=1)
add_definitions(-D__const__=__unused__)
message(STATUS "Compiling for OURSYSTEM=centos9: Setting __const__=__unused__")
else()
add_compile_definitions(USING_CENTOS9=0)
endif()

link_directories(${DEPS_LIBRARY64_DIR})
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
link_directories(${DEPS_LOCAL_LIBRARY_DIR})
Expand Down
357 changes: 357 additions & 0 deletions ci/images/tugraph-compile-centos-stream-9-Dockerfile

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions ci/images/tugraph-compile-centos7-Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,18 @@ RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/tabulate-3
&& tar zxf tabulate-3a5830.tar.gz && cp -rf tabulate/include/tabulate /usr/local/include \
&& rm -rf /tabulate*

# 安装 SWIG
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/swig-4.0.2.tar.gz \
&& tar -xzvf swig-4.0.2.tar.gz && cd swig-4.0.2 && ./configure \
&& make ${JFLAG} && make install && cd .. \
&& rm -rf swig-4.0.2 swig-4.0.2.tar.gz

# 安装 FAISS
RUN wget -O /tmp/openblas-faiss.tar.gz https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/openblas-faiss.tar.gz \
&& tar -xzvf /tmp/openblas-faiss.tar.gz -C /tmp && cd /tmp/openblas-faiss/OpenBLAS && make ${JFLAG} && make install \
&& cd /tmp/openblas-faiss/faiss && cmake -B build -DCMAKE_BUILD_TYPE=Release -DFAISS_ENABLE_GPU=OFF -DFAISS_OPT_LEVEL=generic -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=lib -DOpenMP_CXX_FLAGS="-fopenmp" -DOpenMP_CXX_LIB_NAMES="gomp" -DOpenMP_gomp_LIBRARY="/usr/lib64/libgomp.so.1" -DBLAS_LIBRARIES=/opt/OpenBLAS/lib/libopenblas.so . && make -C build ${JFLAG} && make -C build install \
&& rm -rf /tmp/openblas-faiss /tmp/openblas-faiss.tar.gz && ldconfig

# install vsag
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/vsag-0.11.5.tar.gz -O /tmp/vsag.tar.gz && \
cd /tmp && mkdir vsag && tar -xzf vsag.tar.gz --strip-components=1 -C vsag && cd vsag && \
Expand Down
14 changes: 14 additions & 0 deletions ci/images/tugraph-compile-centos8-Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,20 @@ RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/tabulate-3
&& tar zxf tabulate-3a5830.tar.gz && cp -rf tabulate/include/tabulate /usr/local/include \
&& rm -rf /tabulate*

# 安装 SWIG
RUN yum install -y pcre-devel \
&& wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/swig-4.0.2.tar.gz \
&& tar -xzvf swig-4.0.2.tar.gz && cd swig-4.0.2 && ./configure \
&& make ${JFLAG} && make install && cd .. \
&& rm -rf swig-4.0.2 swig-4.0.2.tar.gz \
&& yum clean all

# 安装 FAISS
RUN wget -O /tmp/openblas-faiss.tar.gz https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/openblas-faiss.tar.gz \
&& tar -xzvf /tmp/openblas-faiss.tar.gz -C /tmp && cd /tmp/openblas-faiss/OpenBLAS && make ${JFLAG} && make install \
&& cd /tmp/openblas-faiss/faiss && cmake -B build -DCMAKE_BUILD_TYPE=Release -DFAISS_ENABLE_GPU=OFF -DFAISS_OPT_LEVEL=generic -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=lib -DOpenMP_CXX_FLAGS="-fopenmp" -DOpenMP_CXX_LIB_NAMES="gomp" -DOpenMP_gomp_LIBRARY="/usr/lib64/libgomp.so.1" -DBLAS_LIBRARIES=/opt/OpenBLAS/lib/libopenblas.so . && make -C build ${JFLAG} && make -C build install \
&& rm -rf /tmp/openblas-faiss /tmp/openblas-faiss.tar.gz && ldconfig

# install vsag
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/vsag-0.11.5.tar.gz -O /tmp/vsag.tar.gz && \
cd /tmp && mkdir vsag && tar -xzf vsag.tar.gz --strip-components=1 -C vsag && cd vsag && \
Expand Down
20 changes: 20 additions & 0 deletions ci/images/tugraph-compile-ubuntu18.04-Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,26 @@ RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/tabulate-3
&& tar zxf tabulate-3a5830.tar.gz && cp -rf tabulate/include/tabulate /usr/local/include \
&& rm -rf /tabulate*

# install SWIG
RUN apt-get update \
&& apt-get install -y libpcre3-dev libgfortran5 \
&& wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/swig-4.0.2.tar.gz \
&& tar -xzvf swig-4.0.2.tar.gz && cd swig-4.0.2 && ./configure \
&& make ${JFLAG} && make install && cd .. \
&& rm -rf swig-4.0.2 swig-4.0.2.tar.gz \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# install FAISS
RUN wget -O /tmp/openblas-faiss.tar.gz https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/openblas-faiss.tar.gz \
&& tar -xzvf /tmp/openblas-faiss.tar.gz -C /tmp && cd /tmp/openblas-faiss/OpenBLAS \
&& dpkg --purge gfortran gfortran-7 libgfortran-7-dev libgfortran4 libgfortran5 && ldconfig \
&& make ${JFLAG} && make install \
&& cd /tmp/openblas-faiss/faiss && cmake -B build -DCMAKE_BUILD_TYPE=Release -DFAISS_ENABLE_GPU=OFF -DFAISS_OPT_LEVEL=generic -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_INSTALL_LIBDIR=lib -DOpenMP_CXX_FLAGS="-fopenmp" -DOpenMP_CXX_LIB_NAMES="gomp" -DOpenMP_gomp_LIBRARY="/usr/lib/x86_64-linux-gnu/libgomp.so.1" -DBLAS_LIBRARIES=/opt/OpenBLAS/lib/libopenblas.so . -DPYTHON_EXECUTABLE=/usr/bin/python3 . \
&& make -C build ${JFLAG} && make -C build install \
&& apt update && apt install -y gfortran && apt-get clean && rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/openblas-faiss /tmp/openblas-faiss.tar.gz && ldconfig

# install vsag
RUN apt-get install -y gfortran && ln -s /usr/lib/x86_64-linux-gnu/libgfortran.so.4 /usr/local/lib/libgfortran.so

Expand Down
30 changes: 30 additions & 0 deletions ci/images/tugraph-mini-runtime-centos-stream-9-Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# quay.io Image
FROM quay.io/centos/centos:stream9
# Alibaba Image
# FROM reg.docker.alibaba-inc.com/fma/centos:9

RUN sed -i 's/^enabled=0/enabled=1/g' /etc/yum.repos.d/centos-addons.repo \
&& sed -i 's/^enabled=0/enabled=1/g' /etc/yum.repos.d/centos.repo

RUN dnf update -y && dnf install -y \
gcc \
openssl-devel.x86_64 \
wget \
libgfortran.x86_64 \
libgomp \
compat-openssl11

# install tugraph
# specifies the path of the object storage where the installation package resides
# example "=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/tugraph-4.3.2"
ARG FILEPATH
# specifies installation package name for tugraph
# example "=tugraph-4.3.2-1.el8.x86_64.rpm"
ARG FILENAME

RUN wget ${FILEPATH}/${FILENAME}
RUN rpm -ivh ${FILENAME} && rm /${FILENAME}

ENV LD_LIBRARY_PATH=/usr/local/lib64/lgraph:/usr/local/lib64:/usr/local/lib:$LD_LIBRARY_PATH

CMD lgraph_server -d run
77 changes: 77 additions & 0 deletions ci/images/tugraph-runtime-centos-stream-9-Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# quay.io Image
FROM quay.io/centos/centos:stream9
# Alibaba Image
# FROM reg.docker.alibaba-inc.com/fma/centos:9

RUN sed -i 's/^enabled=0/enabled=1/g' /etc/yum.repos.d/centos-addons.repo \
&& sed -i 's/^enabled=0/enabled=1/g' /etc/yum.repos.d/centos.repo

RUN dnf update -y && dnf install -y \
git \
gcc \
gcc-c++ \
make \
wget \
bzip2 \
unzip \
openssl-devel.x86_64 \
libgfortran.x86_64 \
libgomp \
libcurl-devel.x86_64 \
compat-openssl11 && dnf clean all

# install g++ 9.4.0
# if it is not accessible, replace it with the link below
# http://ftp.gnu.org/gnu/gcc/gcc-9.4.0/gcc-9.4.0.tar.gz
RUN wget http://ftp.gnu.org/gnu/gcc/gcc-9.4.0/gcc-9.4.0.tar.gz \
&& tar -xvf gcc-9.4.0.tar.gz && cd gcc-9.4.0 \
&& ./contrib/download_prerequisites && mkdir build && cd build \
&& ../configure CFLAGS=-fPIC CXXFLAGS=-fPIC -enable-checking=release -enable-languages=c,c++ -disable-multilib \
&& make -j4 && make install \
&& cp ./x86_64-*-linux-gnu/libstdc++-v3/src/.libs/libstdc++.so.6.0.25 /usr/lib64/ \
&& cd /usr/lib64 && ln -sf libstdc++.so.6.0.25 libstdc++.so.6 \
&& rm -rf /gcc-* && ln -s /usr/local/bin/gcc /usr/local/bin/cc

# install python3
# if it is not accessible, replace it with the link below
# https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/Python-3.6.9.tgz \
&& tar xf Python-3.6.9.tgz && cd Python-3.6.9 && ./configure --prefix=/usr/local \
&& make -j4 && make install \
&& python3 -m pip install --upgrade pip -i https://pypi.antfin-inc.com/simple/ --trusted-host pypi.antfin-inc.com \
&& python3 -m pip install nest_asyncio pexpect requests pytest httpx cython==3.0.0a11 sphinx myst_parser sphinx_panels sphinx_rtd_theme numpy==1.19.5 torch==1.10.2 dgl==1.0.0 ogb pandas==0.24.2 -i https://pypi.antfin-inc.com/simple/ --trusted-host pypi.antfin-inc.com \
&& rm -rf /Python*

# install cmake
# if it is not accessible, replace it with the link below
# https://cmake.org/files/v3.25/cmake-3.25.2.tar.gz
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/cmake-3.25.2.tar.gz \
&& tar xf cmake-3.25.2.tar.gz && cd cmake-3.25.2 \
&& ./bootstrap && make -j4 && make install && rm -rf /cmake-3.*

# install boost-1.68
# if it is not accessible, replace it with the link below
# https://boostorg.jfrog.io/artifactory/main/release/1.68.0/source/boost_1_68_0.tar.gz
RUN wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/boost_1_68_0.tar.gz \
&& wget https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/deps/geometry-extensions.tar.gz \
&& tar xf boost_1_68_0.tar.gz && tar xf geometry-extensions.tar.gz \
&& cd boost_1_68_0 && ./bootstrap.sh --with-libraries=system,random,thread,filesystem,chrono,atomic,date_time,regex,stacktrace,log \
&& ./b2 ${JFLAG} cxxflags="-std=c++17 -fPIC" install \
&& sed -i '513s/BOOST_MPL_ASSERT_MSG((I < 1), INVALID_INDEX,/BOOST_MPL_ASSERT_MSG((I < 1), INVALID_INDEX_,/' /usr/local/include/boost/geometry/index/detail/predicates.hpp \
&& cp -r /extensions /usr/local/include/boost/geometry/ \
&& rm -rf /boost_* /extensions /geometry-extensions.tar.gz

# install tugraph
# specifies the path of the object storage where the installation package resides
# example "=https://tugraph-web.oss-cn-beijing.aliyuncs.com/tugraph/tugraph-4.3.2"
ARG FILEPATH
# specifies installation package name for tugraph
# example "=tugraph-4.3.2-1.el8.x86_64.rpm"
ARG FILENAME

RUN wget ${FILEPATH}/${FILENAME} && rpm -ivh ${FILENAME} && rm -f /${FILENAME}

ENV LD_LIBRARY_PATH=/usr/local/lib64/lgraph:/usr/local/lib64:/usr/local/lib:$LD_LIBRARY_PATH \
PYTHONPATH=/usr/local/lib64/lgraph:/usr/local/lib64:$PYTHONPATH

CMD lgraph_server -d run
21 changes: 21 additions & 0 deletions docs/docusaurus/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Dependencies
/node_modules

# Production
/build
/docs

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
41 changes: 41 additions & 0 deletions docs/docusaurus/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Website

This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

### Installation

```
$ yarn
```

### Local Development

```
$ yarn start
```

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

### Build

```
$ yarn build
```

This command generates static content into the `build` directory and can be served using any static contents hosting service.

### Deployment

Using SSH:

```
$ USE_SSH=true yarn deploy
```

Not using SSH:

```
$ GIT_USER=<Your GitHub username> yarn deploy
```

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.
3 changes: 3 additions & 0 deletions docs/docusaurus/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
Loading

0 comments on commit df138f9

Please sign in to comment.