Skip to content

Commit 66bb774

Browse files
authored
[GLUTEN-7514][VL] Reorganize Dockerfiles and document how to build gluten in docker (#7515)
1 parent 072ba7e commit 66bb774

15 files changed

+46
-187
lines changed

.github/workflows/docker_image.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ on:
2121
- main
2222
paths:
2323
- '.github/workflows/docker_image.yml'
24+
- 'dev/docker/Dockerfile.centos7-static-build'
25+
- 'dev/docker/Dockerfile.centos8-dynamic-build'
2426
schedule:
2527
- cron: '0 20 * * 0'
2628

@@ -45,7 +47,7 @@ jobs:
4547
uses: docker/build-push-action@v2
4648
with:
4749
context: .
48-
file: dev/vcpkg/docker/Dockerfile.gha
50+
file: dev/docker/Dockerfile.centos7-static-build
4951
push: true
5052
tags: apache/gluten:vcpkg-centos-7
5153

@@ -69,6 +71,6 @@ jobs:
6971
uses: docker/build-push-action@v2
7072
with:
7173
context: .
72-
file: .github/workflows/docker/Dockerfile.gha
74+
file: dev/docker/Dockerfile.centos8-dynamic-build
7375
push: true
7476
tags: apache/gluten:centos-8

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ thirdparty/*.tar*
5252
CMakeFiles/
5353
CMakeCache.txt
5454
CTestTestfile.cmake
55-
Makefile
5655
cmake_install.cmake
5756
build/
5857
*-build/

dev/.dockerignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*
2+
!/vcpkg/setup-build-depends.sh
3+
!/docker/entrypoint.sh

dev/vcpkg/docker/Dockerfile dev/docker/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ FROM centos:7
33
RUN sed -i "s/enabled=1/enabled=0/" /etc/yum/pluginconf.d/fastestmirror.conf
44

55
WORKDIR /tmp/vcpkg
6-
COPY setup-build-depends.sh setup-build-depends.sh
6+
COPY vcpkg/setup-build-depends.sh setup-build-depends.sh
77
RUN ./setup-build-depends.sh
88

99
WORKDIR /
@@ -22,4 +22,4 @@ USER ${BUILDER_UID}:${BUILDER_GID}
2222
ENV VCPKG_BINARY_SOURCES=default
2323
COPY docker/entrypoint.sh /entrypoint
2424
ENTRYPOINT ["/entrypoint"]
25-
CMD ["sleep", "inf"]
25+
CMD ["sleep", "inf"]
File renamed without changes.

dev/vcpkg/Makefile dev/docker/Makefile

+13-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DOCKER_IMAGE=apache/gluten:vcpkg-centos-7
1+
DOCKER_IMAGE=apache/gluten:centos-7-vcpkg-build-depends
22
GLUTEN_REPO=$(shell realpath -L ../..)
33

44
CCACHE_DIR=$(HOME)/.ccache
@@ -17,26 +17,32 @@ build: $(CCACHE_DIR) $(VCPKG_BINARY_CACHE_DIR) $(MAVEN_M2_DIR)
1717
-e http_proxy \
1818
-e https_proxy \
1919
--workdir $(GLUTEN_REPO) \
20-
-ti \
2120
$(DOCKER_IMAGE) \
2221
./dev/package-vcpkg.sh
2322

2423
docker-image:
2524
docker build \
26-
--file docker/Dockerfile \
25+
--file Dockerfile \
2726
--build-arg BUILDER_UID=`id -u` \
2827
--build-arg BUILDER_GID=`id -g` \
2928
--tag "$(DOCKER_IMAGE)" \
30-
.
29+
..
3130

32-
docker-image-gha:
31+
docker-image-static-build:
3332
docker build \
34-
--file docker/Dockerfile.gha \
35-
--tag "$(DOCKER_IMAGE)" \
33+
--file Dockerfile.centos7-static-build \
34+
--tag "apache/gluten:vcpkg-centos-7" \
3635
--build-arg HTTPS_PROXY="" \
3736
--build-arg HTTP_PROXY="" \
3837
.
3938

39+
docker-image-dynamic-build:
40+
docker build \
41+
--file Dockerfile.centos8-dynamic-build \
42+
--tag "apache/gluten:centos-8" \
43+
--build-arg HTTPS_PROXY="" \
44+
--build-arg HTTP_PROXY="" \
45+
.
4046

4147
$(CCACHE_DIR) $(VCPKG_BINARY_CACHE_DIR) $(MAVEN_M2_DIR): %:
4248
mkdir -p $@
File renamed without changes.

dev/vcpkg/.dockerignore

-5
This file was deleted.

docs/developers/ProfileMemoryOfGlutenWithVelox.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: page
33
title: Profile memory consumption of Gluten
4-
nav_order: 15
4+
nav_order: 8
55
has_children: true
66
parent: /developer-overview/
77
---

docs/developers/docker_centos7.md

-53
This file was deleted.

docs/developers/docker_centos8.md

-49
This file was deleted.

docs/developers/docker_ubuntu22.04.md

-65
This file was deleted.

docs/developers/velox-backend-CI.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
layout: page
33
title: Velox Backend CI
4-
nav_order: 14
4+
nav_order: 6
55
parent: Developer Overview
66
---
77
# Velox Backend CI
88

99
GHA workflows are defined under `.github/workflows/`.
1010

1111
## Docker Build
12-
We have a weekly job to build a docker based on `Dockerfile.gha` for CI verification, defined in `docker_image.yml`.
12+
We have a weekly job defined in `docker_image.yml` to build docker images based on `Dockerfile.centos7-static-build` and `Dockerfile.centos8-dynamic-build` for CI verification.
1313

1414
## Vcpkg Caching
1515
Gluten main branch is pulled down during docker build. And vcpkg will cache binary data of all dependencies defined under dev/vcpkg.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
layout: page
3+
title: Build Gluten Velox backend in docker
4+
nav_order: 7
5+
parent: Developer Overview
6+
---
7+
8+
Currently, Centos-7/8/9 and Ubuntu 20.04/22.04 are supported to build Gluten Velox backend. Please refer to
9+
`.github/workflows/velox_weekly.yml` to install required tools before the build.
10+
11+
There are two docker images with almost all dependencies installed, respective for static build and dynamic build.
12+
The according Dockerfiles are respectively `Dockerfile.centos7-static-build` and `Dockerfile.centos8-dynamic-build`
13+
under `dev/docker/`.
14+
15+
```shell
16+
# For static build on centos-7.
17+
docker pull apache/gluten:vcpkg-centos-7
18+
19+
# For dynamic build on centos-8.
20+
docker pull apache/gluten:centos-8 (dynamic build)
21+
```

0 commit comments

Comments
 (0)