-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5d58b42
commit 1e35189
Showing
4 changed files
with
93 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Dockerfile | ||
.metals/ | ||
.vscode/ | ||
# mount dataset, don't copy to image | ||
dataset/* | ||
*/target/ | ||
*logs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: FeBench Docker | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
VERSION: | ||
description: 'FeBench image version' | ||
required: true | ||
default: '0.5.0' | ||
|
||
env: | ||
IMAGE_NAME: febench | ||
|
||
jobs: | ||
build-and-publish: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v2 | ||
|
||
- name: Setup Docker Buildx | ||
uses: docker/setup-buildx-action@v2 | ||
|
||
- name: Decide Push | ||
run: | | ||
if [[ ${{ github.event_name }} = 'workflow_dispatch' ]]; then | ||
echo "PUSH=true" >> $GITHUB_ENV | ||
VERSION=${{ github.event.inputs.VERSION }} | ||
DOCKERHUB_TAG=${{ secrets.DOCKERHUB_REPO }}/$IMAGE_NAME:$VERSION | ||
DOCKERHUB_LATEST=${{ secrets.DOCKERHUB_REPO }}/$IMAGE_NAME:latest | ||
echo "DockerHub Tag: $DOCKERHUB_TAG" | ||
echo "COMMIT=${{ github.sha }}" | ||
echo "DOCKERHUB_TAG=$DOCKERHUB_TAG" >> $GITHUB_ENV | ||
echo "DOCKERHUB_LATEST=$DOCKERHUB_LATEST" >> $GITHUB_ENV | ||
else | ||
echo "PUSH=false" >> $GITHUB_ENV | ||
fi | ||
- name: Login to Docker Hub | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
uses: docker/login-action@v2 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build And Push | ||
id: docker_build | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
uses: docker/build-push-action@v3 | ||
with: | ||
context: demo | ||
push: ${{ env.PUSH }} | ||
platforms: linux/amd64 | ||
tags: | | ||
${{ env.DOCKERHUB_TAG }} | ||
${{ env.DOCKERHUB_LATEST }} | ||
build-args: OPENMLDB_VERSION=${{ github.event.inputs.VERSION }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# copy openmldb package from | ||
FROM 4pdosc/openmldb:0.8.2 AS builder | ||
|
||
FROM openjdk:11.0.13-jdk-slim-bullseye | ||
COPY --from=builder /work/openmldb /work/openmldb | ||
# group name | ||
LABEL org.opencontainers.image.authors="Huang Wei" | ||
# TAG | ||
|
||
# ignores in .dockerignore | ||
COPY * /work/febench/ | ||
# febench use zk 7181 | ||
RUN sed -i'' 's/localhost:2181/localhost:7181/g' /work/openmldb/conf/hosts | ||
|
||
# maven | ||
RUN apt update && apt install -y vim maven | ||
|
||
WORKDIR /work | ||
|
||
CMD [ "/bin/bash" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters