Skip to content

Commit

Permalink
fix CI failure when building manylinux and dev images
Browse files Browse the repository at this point in the history
  • Loading branch information
lidongze0629 committed Aug 12, 2024
1 parent 6e15ef7 commit 87f8fcb
Show file tree
Hide file tree
Showing 22 changed files with 393 additions and 506 deletions.
277 changes: 67 additions & 210 deletions .github/workflows/build-graphscope-dev-images.yml

Large diffs are not rendered by default.

56 changes: 56 additions & 0 deletions .github/workflows/build-graphscope-dev-wheel-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build GraphScope Wheel Images

# build `graphscope/graphscope-dev:wheel-{v6d_version}` image based on manylinux,
# including all dependencies for building graphscope wheel package.
on:
workflow_dispatch:
inputs:
v6d_version:
description: 'Version for Vineyard (v6d)'
required: true
default: 'main'
pull_request:
branches:
- main
paths:
- 'python/graphscope/gsctl/scripts/**'
- '.github/workflows/build-graphscope-dev-wheel-images.yml'

concurrency:
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true

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

jobs:
build-wheel-image-amd64:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Build Image
run: |
# build wheel image with specified v6d's version
cd ${GITHUB_WORKSPACE}/k8s
VINEYARD_VERSION=${{ github.event.inputs.v6d_version }}
if [[ -n ${VINEYARD_VERSION} ]]; then
# graphscope/graphscope-dev:wheel-<v6d_version>-amd64
make dev-wheel VINEYARD_VERSION=${VINEYARD_VERSION}
else
# pull_request: use default vineyard_version
make dev-wheel
fi
- name: Release Image
if: ${{ github.event_name == 'workflow_dispatch' }}
env:
docker_password: ${{ secrets.DOCKER_PASSWORD }}
docker_username: ${{ secrets.DOCKER_USER }}
run: |
echo "${docker_password}" | sudo docker login --username="${docker_username}" ${{ env.REGISTRY }} --password-stdin
VINEYARD_VERSION=${{ github.event.inputs.v6d_version }}
sudo docker tag graphscope/graphscope-dev:wheel-${VINEYARD_VERSION}-amd64 ${{ env.REGISTRY }}/graphscope/graphscope-dev:wheel-${VINEYARD_VERSION}-amd64
sudo docker push ${{ env.REGISTRY }}/graphscope/graphscope-dev:wheel-${VINEYARD_VERSION}-amd64
106 changes: 0 additions & 106 deletions .github/workflows/build-graphscope-manylinux-ext-images.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/build-graphscope-manylinux-images.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build GraphScope Manylinux Images

# build `graphscope/manylinux2014` image based on centos7, including all necessary
# dependencies except vineyard
on:
workflow_dispatch:
pull_request:
branches:
- main
paths:
- 'python/graphscope/gsctl/scripts/**'
- '.github/workflows/build-graphscope-manylinux-images.yml'


concurrency:
group: ${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{ github.workflow }}
cancel-in-progress: true

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

jobs:
build-manylinux-image-amd64:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Build Image
run: |
cd ${GITHUB_WORKSPACE}/k8s
# output: graphscope/manylinux:amd64
make manylinux2014
- name: Release Image
if: ${{ github.event_name == 'workflow_dispatch' }}
env:
docker_password: ${{ secrets.DOCKER_PASSWORD }}
docker_username: ${{ secrets.DOCKER_USER }}
run: |
echo "${docker_password}" | sudo docker login --username="${docker_username}" ${{ env.REGISTRY }} --password-stdin
# manylinux2014 image
sudo docker tag graphscope/manylinux2014:amd64 ${{ env.REGISTRY }}/graphscope/manylinux2014:amd64
sudo docker push ${{ env.REGISTRY }}/graphscope/manylinux2014:amd64
45 changes: 28 additions & 17 deletions k8s/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ ifeq ($(REGISTRY),)
REGISTRY := registry.cn-hongkong.aliyuncs.com
endif

# x86_64 or aarch64
ARCH := $(shell uname -m)
PLATFORM := $(shell uname -m)
# can be: x86_64, arm64
ARCH := $(subst x86_64,amd64,$(subst aarch64,arm64,$(PLATFORM)))


VERSION ?= latest
VINEYARD_VERSION ?= v0.23.0
Expand Down Expand Up @@ -41,36 +43,34 @@ interactive: interactive-frontend interactive-executor
all: coordinator analytical interactive learning
graphscope: all

manylinux2014:
cd $(WORKING_DIR)/../ && \
docker build \
-t graphscope/manylinux2014:${ARCH} \
-f $(DOCKERFILES_DIR)/manylinux2014.Dockerfile .

dev-wheel:
cd $(WORKING_DIR) && \
cd ../python/graphscope && \
cd $(WORKING_DIR)/../ && \
docker build \
--build-arg ARCH=$(ARCH) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg VINEYARD_VERSION=${VINEYARD_VERSION} \
-t graphscope/graphscope-dev:wheel-${VINEYARD_VERSION}-${ARCH} \
-f $(DOCKERFILES_DIR)/manylinux2014.Dockerfile .


manylinux2014-ext:
cd $(WORKING_DIR) && \
cd ../python/graphscope && \
docker build \
-t graphscope/manylinux2014:ext-${ARCH} \
-f $(DOCKERFILES_DIR)/manylinux2014-ext.Dockerfile .
-f $(DOCKERFILES_DIR)/graphscope-dev-wheel.Dockerfile .

graphscope-dev:
cd $(WORKING_DIR) && \
cd ../python/graphscope && \
cd $(WORKING_DIR)/../ && \
docker build \
--build-arg ARCH=$(ARCH) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg VINEYARD_VERSION=${VINEYARD_VERSION} \
-t graphscope/graphscope-dev:${VINEYARD_VERSION}-${ARCH} \
-f $(DOCKERFILES_DIR)/graphscope-dev.Dockerfile .

vineyard-dev:
cd $(WORKING_DIR) && \
cd ../python/graphscope && \
cd $(WORKING_DIR)/../ && \
docker build \
--build-arg ARCH=$(ARCH) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg VINEYARD_VERSION=${VINEYARD_VERSION} \
-t graphscope/vineyard-dev:${VINEYARD_VERSION}-${ARCH} \
Expand All @@ -79,6 +79,7 @@ vineyard-dev:
vineyard-runtime:
cd $(WORKING_DIR) && \
docker build \
--build-arg ARCH=$(ARCH) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg BUILDER_VERSION=$(BUILDER_VERSION) \
-t graphscope/vineyard-runtime:${VINEYARD_VERSION}-${ARCH} \
Expand All @@ -88,6 +89,7 @@ coordinator:
cd $(WORKING_DIR)/.. && \
docker build \
--target coordinator \
--build-arg ARCH=$(ARCH) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg BUILDER_VERSION=$(BUILDER_VERSION) \
--build-arg CI=${CI} \
Expand All @@ -98,6 +100,7 @@ analytical:
cd $(WORKING_DIR)/.. && \
docker build \
--target analytical \
--build-arg ARCH=$(ARCH) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg BUILDER_VERSION=$(BUILDER_VERSION) \
--build-arg RUNTIME_VERSION=$(RUNTIME_VERSION) \
Expand All @@ -109,6 +112,7 @@ analytical-java:
cd $(WORKING_DIR)/.. && \
docker build \
--target analytical-java \
--build-arg ARCH=$(ARCH) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg BUILDER_VERSION=$(BUILDER_VERSION) \
--build-arg RUNTIME_VERSION=$(RUNTIME_VERSION) \
Expand All @@ -120,6 +124,7 @@ interactive-frontend:
cd $(WORKING_DIR)/.. && \
docker build \
--target frontend \
--build-arg ARCH=$(ARCH) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg BUILDER_VERSION=$(BUILDER_VERSION) \
--build-arg RUNTIME_VERSION=$(RUNTIME_VERSION) \
Expand All @@ -132,6 +137,7 @@ interactive-executor:
cd $(WORKING_DIR)/.. \
&& docker build \
--target executor \
--build-arg ARCH=$(ARCH) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg BUILDER_VERSION=$(BUILDER_VERSION) \
--build-arg RUNTIME_VERSION=$(RUNTIME_VERSION) \
Expand All @@ -145,6 +151,7 @@ interactive-experimental:
cd $(WORKING_DIR)/.. && \
docker build \
--target experimental \
--build-arg ARCH=$(ARCH) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg BUILDER_VERSION=$(BUILDER_VERSION) \
-t graphscope/interactive-experimental:${VERSION} \
Expand All @@ -155,6 +162,7 @@ flex-interactive:
cd $(WORKING_DIR)/.. && \
docker build \
--target runtime \
--build-arg ARCH=$(ARCH) \
--build-arg ENABLE_COORDINATOR=${ENABLE_COORDINATOR} \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg BUILDER_VERSION=$(BUILDER_VERSION) \
Expand All @@ -166,6 +174,7 @@ learning:
cd $(WORKING_DIR)/.. && \
docker build \
--target learning \
--build-arg ARCH=$(ARCH) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg BUILDER_VERSION=$(BUILDER_VERSION) \
--build-arg RUNTIME_VERSION=$(RUNTIME_VERSION) \
Expand All @@ -177,6 +186,7 @@ graphlearn-torch:
cd $(WORKING_DIR)/.. && \
docker build \
--target graphlearn-torch \
--build-arg ARCH=$(ARCH) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg BUILDER_VERSION=$(BUILDER_VERSION) \
--build-arg RUNTIME_VERSION=$(RUNTIME_VERSION) \
Expand All @@ -187,6 +197,7 @@ graphlearn-torch:
graphscope-store:
cd $(WORKING_DIR)/.. && \
docker build \
--build-arg ARCH=$(ARCH) \
--build-arg REGISTRY=$(REGISTRY) \
--build-arg BUILDER_VERSION=$(BUILDER_VERSION) \
--build-arg profile=${PROFILE} \
Expand Down
Loading

0 comments on commit 87f8fcb

Please sign in to comment.