Project: GraphScope (App Definition and Development / Database)
File: install_in_offline_env.md

Some users may face the problem that they need to install GraphScope on an environment that has no internet access. We provide some sample solutions to address that problems. Users could download the all the wheels along with its dependencies of graphscope for offline usage. Create a requirements.txt file that lists all of the packages you need. You can do this by running the following command: `echo "graphscope" > requirements.txt` Download the wheels for all of the packages listed in the requirements.txt file. You can do this by running the following command: `pip download -r requirements.txt` Copy the wheels to a folder on your computer that you can access offline. When you need to use the packages offline, you can install them by running the following command: `pip install --no-index --find-links=./wheels .` This will install all of the packages listed in the `requirements.txt` file from the wheels that you have downloaded. We give an example to start with a basic operating system, download all dependencies for offline use, and the compile options to compile and install dependencies and graphscope analytical engine. The operating system: CentOS 7 Dependencies: GCC 8.3.1 make 3.82 which (boost dependency) perl (boost dependency) Python 3.8 (vineyard dependency) cmake v3.24.3 openmpi 4.0.5 gflags 2.2.2 glog 0.6.0 apache-arrow 10.0.1 boost 1.74.0 openssl 1.1.1 zlib 1.2.11 protobuf 21.9 grpc 1.49.1 libgrape-lite master vineyard 0.13.5 libclang (python package) Dependency location for downloading: And you could get the source code of GraphScope on ```bash curl -LO https://graphscope.oss-cn-beijing.aliyuncs.com/dependencies/dependencies.tar.gz curl -LO https://graphscope.oss-cn-beijing.aliyuncs.com/dependencies/libgrape-lite.tar.gz git clone https://github.com/alibaba/graphscope tar czf graphscope.tar.gz graphscope ``` ``` mkdir -p workdir tar xzf dependencies.tar.gz -C workdir/ tar xzf libgrape-lite.tar.gz -C workdir/dependencies/ tar xzf graphscope.tar.gz -C workdir/dependencies/ ``` ```bash yum install centos-release-scl-rh -y yum install which perl make devtoolset-8-gcc-c++ rh-python38-python-pip -y source /opt/rh/devtoolset-8/enable source /opt/rh/rh-python38/enable ``` ```bash set -euxo pipefail export DIR=/data/dependencies export PREFIX=/data/install mkdir -p ${PREFIX} export PATH=${PREFIX}/bin/:${PATH}/ export LDLIBRARYPATH=${LDLIBRARYPATH:-""}:${PREFIX}/lib:${PREFIX}/lib64 python3 -m pip install ${DIR}/libclang-16.0.0-py2.py3-none-manylinux2010x8664.whl bash ${DIR}/cmake-3.24.3-linux-x86_64.sh --skip-license --prefix=${PREFIX} cd ${DIR}/gflags-2.2.2 cmake . -DBUILDSHAREDLIBS=ON \ -DCMAKEPREFIXPATH="${PREFIX}" \ -DCMAKEINSTALLPREFIX="${PREFIX}" make -j && make install cd ${DIR}/glog-0.6.0 cmake . -DBUILDSHAREDLIBS=ON \ -DCMAKEPREFIXPATH=${PREFIX} \ -DCMAKEINSTALLPREFIX=${PREFIX} make -j && make install cd ${DIR}/boost174_0 ./bootstrap.sh --prefix=${PREFIX} --with-libraries=system,filesystem,context,programoptions,regex,thread,random,chrono,atomic,datetime ./b2 install link=shared runtime-link=shared variant=release threading=multi cd ${DIR}/openssl-OpenSSL11_1h ./config --prefix="${PREFIX}" -fPIC -shared make -j make install cd ${DIR}/arrow-apache-arrow-10.0.1 mkdir -p build && cd build cmake ../cpp \ -DCMAKEPREFIXPATH=${PREFIX} \ -DCMAKEINSTALLPREFIX=${PREFIX} \ -DARROW_COMPUTE=ON \ -DARROWWITHUTF8PROC=OFF \ -DARROW_CSV=ON \ -DARROW_FILESYSTEM=ON \ -DARROW_IPC=ON \ -DARROWBUILDBENCHMARKS=OFF \ -DARROWBUILDEXAMPLES=OFF \ -DARROWBUILDINTEGRATION=OFF \ -DARROWBUILDUTILITIES=OFF \ -DARROWBUILDTESTS=OFF \ -DARROWENABLETIMING_TESTS=OFF \ -DARROW_FUZZING=OFF \ -DARROW_JEMALLOC=OFF \ -DARROWBUILDSHARED=ON \ -DARROWBUILDSTATIC=OFF make -j && make install cd ${DIR}/openmpi-4.0.5 ./configure --enable-mpi-cxx --disable-dlopen --prefix=${PREFIX} make -j$(nproc) make install cd ${DIR}/protobuf-21.9 ./configure --prefix="${PREFIX}" --enable-shared --disable-static make -j$(nproc) make install cd ${DIR}/zlib-1.2.11 cmake . -DCMAKEINSTALLPREFIX="${PREFIX}" \ -DCMAKEPREFIXPATH="${PREFIX}" \ -DBUILDSHAREDLIBS=ON make -j$(nproc) make install cd ${DIR}/grpc cmake . -DCMAKEINSTALLPREFIX="${PREFIX}" \ -DCMAKEPREFIXPATH="${PREFIX}" \ -DBUILDSHAREDLIBS=ON \ -DgRPC_INSTALL=ON \ -DgRPCBUILDTESTS=OFF \ -DgRPCBUILDCSHARP_EXT=OFF \ -DgRPCBUILDGRPCCSHARPPLUGIN=OFF \ -DgRPCBUILDGRPCNODEPLUGIN=OFF \ -DgRPCBUILDGRPCOBJECTIVEC_PLUGIN=OFF \ -DgRPCBUILDGRPCPHPPLUGIN=OFF \ -DgRPCBUILDGRPCPYTHONPLUGIN=OFF \ -DgRPCBUILDGRPCRUBYPLUGIN=OFF \ -DgRPCBACKWARDSCOMPATIBILITY_MODE=ON \ -DgRPCPROTOBUFPROVIDER=package \ -DgRPCZLIBPROVIDER=package \ -DgRPCSSLPROVIDER=package \ -DOPENSSLROOTDIR="${PREFIX}" \ -DCMAKECXXFLAGS="-fpermissive" make -j make install cd ${DIR}/libgrape-lite cmake . -DCMAKEPREFIXPATH="${PREFIX}" \ -DCMAKEINSTALLPREFIX="${PREFIX}" make -j make install cd ${DIR}/v6d-0.13.4 cmake . -DCMAKEPREFIXPATH="${PREFIX}" \ -DCMAKEINSTALLPREFIX="${PREFIX}" \ -DBUILDVINEYARDTESTS=OFF \ -DBUILDSHAREDLIBS=ON \ -DBUILDVINEYARDPYTHON_BINDINGS=OFF make -j4 make install cd ${DIR}/graphscope/analytical_engine mkdir -p build && cd build cmake .. -DCMAKEPREFIXPATH=${PREFIX} \ -DCMAKEINSTALLPREFIX=${PREFIX} \ -DNETWORKX=OFF \ -DENABLEJAVASDK=OFF \ -DBUILD_TESTS=OFF make -j make install echo "Install complete, you could find the binary file in the ${PREFIX}/bin" ```