Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes CI failure both on Linux and MacOS #2244

Merged
merged 14 commits into from
Nov 30, 2022
7 changes: 2 additions & 5 deletions .github/workflows/build-graphscope-wheels-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- "v*"

env:
REGISTRY: registry-vpc.cn-hongkong.aliyuncs.com
REGISTRY: registry.cn-hongkong.aliyuncs.com

jobs:
build-wheels:
Expand Down Expand Up @@ -116,10 +116,7 @@ jobs:

# make jupyter-image
cd ..
docker build \
--build-arg CI=${CI} \
-t graphscope/jupyter:${SHORT_SHA} \
-f ./k8s/internal/jupyter.Dockerfile .
docker build --build-arg CI=${CI} -t graphscope/jupyter:${SHORT_SHA} -f ./k8s/internal/jupyter.Dockerfile .

# dataset image doesn't changed, we can just use the latest one
# make dataset-image
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ clean:
rm -rf $(ANALYTICAL_BUILD_DIR) $(ANALYTICAL_DIR)/proto
cd $(ANALYTICAL_DIR)/java && mvn clean

cd $(INTERACTIVE_DIR) && mvn clean
# TODO: use maven clean to clean ir target
cd $(INTERACTIVE_DIR) && mvn clean || true
# TODO: use maven clean to clean ir target
rm -rf $(INTERACTIVE_DIR)/executor/ir/target

rm -rf $(LEARNING_BUILD_DIR) $(LEARNING_DIR)/proto/*.h $(LEARNING_DIR)/proto/*.cc
Expand Down
13 changes: 8 additions & 5 deletions k8s/build_scripts/build_vineyard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ echo "Installing libgrape-lite"
cd ${WORKDIR} && \
git clone -b master https://github.com/alibaba/libgrape-lite.git --depth=1 && \
cd libgrape-lite && \
cmake . && \
cmake . -DCMAKE_INSTALL_PREFIX=/opt/vineyard && \
make -j$(nproc) && \
make install && \
rm -rf ${WORKDIR}/libgrape-lite
Expand All @@ -19,14 +19,17 @@ cd ${WORKDIR} && \
git clone -b v0.10.2 https://github.com/v6d-io/v6d.git --depth=1 && \
pushd v6d && \
git submodule update --init && \
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local \
cmake . -DCMAKE_PREFIX_PATH=/opt/vineyard \
-DCMAKE_INSTALL_PREFIX=/opt/vineyard \
-DBUILD_VINEYARD_TESTS=OFF \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_VINEYARD_PYTHON_BINDINGS=ON && \
make -j$(nproc) && \
make install && \
strip /usr/local/bin/vineyard* /usr/local/lib/libvineyard* && \
popd && \
strip /opt/vineyard/bin/vineyard* /opt/vineyard/lib/libvineyard* && \
python3 setup.py bdist_wheel && \
python3 setup_io.py bdist_wheel && \
pip3 install dist/*
pip3 install dist/* && \
sudo cp -r /opt/vineyard/* /usr/local/ && \
rm -rf ${WORKDIR}/v6d

35 changes: 18 additions & 17 deletions k8s/build_scripts/build_vineyard_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,28 @@ cd ${WORKDIR} && \
bash cmake-3.24.3-linux-x86_64.sh --prefix=/usr/local --skip-license && \
rm -rf ${WORKDIR}/cmake-3.24.3-linux-x86_64.sh

# install openmpi v4.1.4
# install openmpi v4.0.5
echo "Installing openmpi"
cd ${WORKDIR} && \
wget -q https://download.open-mpi.org/release/open-mpi/v4.1/openmpi-4.1.4.tar.gz && \
tar zxvf openmpi-4.1.4.tar.gz && \
cd openmpi-4.1.4 && \
./configure --enable-mpi-cxx --disable-dlopen --prefix=/usr/local && \
wget -q https://download.open-mpi.org/release/open-mpi/v4.0/openmpi-4.0.5.tar.gz && \
tar zxvf openmpi-4.0.5.tar.gz && \
cd openmpi-4.0.5 && \
./configure --enable-mpi-cxx --disable-dlopen --prefix=/opt/openmpi && \
make -j$(nproc) && \
make install && \
rm -rf ${WORKDIR}/openmpi-4.1.4 ${WORKDIR}/openmpi-4.1.4.tar.gz
cp -rs /opt/openmpi/* /usr/local/ && \
rm -rf ${WORKDIR}/openmpi-4.0.5 ${WORKDIR}/openmpi-4.0.5.tar.gz

# gflags v2.2.2
echo "Installing gflags"
cd ${WORKDIR} && \
wget -q https://github.com/gflags/gflags/archive/v2.2.2.tar.gz && \
tar zxvf v2.2.2.tar.gz && \
cd gflags-2.2.2 && \
cmake . -DBUILD_SHARED_LIBS=ON && \
make -j$(nproc) && \
make install && \
rm -rf ${WORKDIR}/v2.2.2.tar.gz ${WORKDIR}/gflags-2.2.2

# GLOG 0.6.0
echo "Installing glog"
Expand Down Expand Up @@ -81,17 +93,6 @@ cd ${WORKDIR} && \
make install && \
rm -rf ${WORKDIR}/arrow-apache-arrow-9.0.0 ${WORKDIR}/apache-arrow-9.0.0.tar.gz

# gflags v2.2.2
echo "Installing gflags"
cd ${WORKDIR} && \
wget -q https://github.com/gflags/gflags/archive/v2.2.2.tar.gz && \
tar zxvf v2.2.2.tar.gz && \
cd gflags-2.2.2 && \
cmake . -DBUILD_SHARED_LIBS=ON && \
make -j$(nproc) && \
make install && \
rm -rf ${WORKDIR}/v2.2.2.tar.gz ${WORKDIR}/gflags-2.2.2

# Boost 1.74.0, required by vineyard
echo "Installing boost"
cd ${WORKDIR} && \
Expand Down
2 changes: 1 addition & 1 deletion k8s/dockerfiles/graphscope-dev-base.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ FROM vineyardcloudnative/manylinux-llvm:2014-11.0.0 AS llvm
FROM $REGISTRY/graphscope/manylinux2014:2022-08-16-53df7cb

# yum install dependencies
RUN yum install -y perl which sudo wget libunwind-devel vim zip java-1.8.0-openjdk-devel msgpack-devel rapidjson-devel libuuid-devel && \
RUN yum install -y perl which sudo wget libunwind-devel vim zip java-1.8.0-openjdk-devel msgpack-devel rapidjson-devel libuuid-devel openssh-clients && \
yum clean all -y && \
rm -fr /var/cache/yum

Expand Down
14 changes: 10 additions & 4 deletions k8s/internal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@ ifeq ($(REGISTRY),)
endif


UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S), Linux)
XARGS_EMPTY_FLAG := --no-run-if-empty
endif

# Default null
TARGET_SERVER_PACKAGE :=
TARGET_CLIENT_PACKAGE :=
ifeq ($(UNAME_S), Linux)
TARGET_SERVER_PACKAGE := graphscope-manylinux2014-py3
TARGET_CLIENT_PACKAGE := graphscope-client-manylinux2014-py3
TARGET_CLIENT_PACKAGE := graphscope-client-manylinux2014-py3
else
TARGET_SERVER_PACKAGE := graphscope-darwin-py3
TARGET_CLIENT_PACKAGE := graphscope-client-darwin-py3
Expand Down Expand Up @@ -108,15 +113,15 @@ graphscope-manylinux2014-py3-nodocker:
package_name=graphscope python3 setup.py bdist_wheel && \
cd dist && \
for wheel in `ls ./*.whl`; do \
auditwheel repair $$wheel --plat=manylinux2014_x86_64 && rm $$wheel; \
(auditwheel repair $$wheel --plat=manylinux2014_x86_64 && rm $$wheel) || true; \
done

graphscope-manylinux2014-py3:
docker pull ${REGISTRY}/graphscope/graphscope-dev:${VINEYARD_VERSION}
docker run --rm -v $(WORKING_DIR)/../..:/work \
${REGISTRY}/graphscope/graphscope-dev:${VINEYARD_VERSION} \
bash -c 'source ~/.bashrc && \
cd /work/k8s && \
cd /work/k8s/internal && \
make graphscope-manylinux2014-py3-nodocker'

graphscope-client-manylinux2014-py3-nodocker:
Expand Down Expand Up @@ -144,6 +149,7 @@ graphscope-client-manylinux2014-py3-nodocker:
graphscope-client-darwin-py3:
cd $(WORKING_DIR)/../../learning_engine/graph-learn && \
git submodule update --init third_party/pybind11 && \
cd graphlearn && \
rm -rf cmake-build && \
mkdir -p cmake-build && \
cd cmake-build && \
Expand All @@ -163,5 +169,5 @@ graphscope-client-manylinux2014-py3:
docker pull ${REGISTRY}/graphscope/graphscope-dev:${VINEYARD_VERSION}
docker run --rm -v $(WORKING_DIR)/../..:/work \
${REGISTRY}/graphscope/graphscope-dev:${VINEYARD_VERSION} \
bash -c 'cd /work/k8s && make graphscope-client-manylinux2014-py3-nodocker'
bash -c 'cd /work/k8s/internal && make graphscope-client-manylinux2014-py3-nodocker'

2 changes: 2 additions & 0 deletions scripts/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ write_envs_config() {
{
echo "export CC=${homebrew_prefix}/opt/llvm/bin/clang"
echo "export CXX=${homebrew_prefix}/opt/llvm/bin/clang++"
echo "export CARGO_TARGET_X86_64_APPLE_DARWIN_LINKER=${CC}"
if [ -z "${JAVA_HOME}" ]; then
echo "export JAVA_HOME=\$(/usr/libexec/java_home -v11)"
fi
Expand Down Expand Up @@ -759,6 +760,7 @@ install_dependencies() {
export OPENSSL_SSL_LIBRARY=${homebrew_prefix}/opt/openssl/lib/libssl.dylib
export CC=${homebrew_prefix}/opt/llvm/bin/clang
export CXX=${homebrew_prefix}/opt/llvm/bin/clang++
export CARGO_TARGET_X86_64_APPLE_DARWIN_LINKER=${CC}
export CPPFLAGS=-I${homebrew_prefix}/opt/llvm/include
fi

Expand Down