Skip to content

Commit

Permalink
chore: add evaluation CLI dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Lanture1064 committed Jan 23, 2024
1 parent a06c9dd commit 3e21e1f
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 2 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/eval_image_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Build Evaluation Image
on:
push:
branches:
- main
jobs:
build:
if: github.repository == 'kubeagi/arcadia'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set Variable
id: set-env
run: |
TAG=$(git describe --tags --abbrev=0 --match 'v*' 2> /dev/null) || true
if [ -z "$TAG" ]; then
echo "No tag found, use v0.1.0 as default"
TAG=v0.1.0
fi
echo "TAG=${TAG}" >> $GITHUB_OUTPUT
echo "DATE=$(TZ=Asia/Shanghai date +'%Y%m%d')" >> $GITHUB_OUTPUT
- name: Show Variable
run: echo "varibables ${{ steps.set-env.outputs.TAG }}-${{ steps.set-env.outputs.DATE }}"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
buildkitd-flags: --debug
config-inline: |
[worker.oci]
max-parallelism = 1
- name: Login to the dockerhub Registry
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- uses: benjlevesque/[email protected]
name: Get short commit sha
id: short-sha
- name: Build and push Evaluation Image
id: push-eval
uses: docker/build-push-action@v5
with:
context: .
file: deploy/evaluation/Dockerfile
platforms: linux/amd64,linux/arm64
tags: |
kubeagi/arcadia-eval:latest
kubeagi/arcadia-eval:${{ steps.set-env.outputs.TAG }}
kubeagi/arcadia-eval:${{ steps.set-env.outputs.TAG }}-${{ steps.set-env.outputs.DATE }}-${{ steps.short-sha.outputs.sha }}
push: true
build-args: |
PYTHON_INDEX_URL=${{ env.PYTHON_INDEX_URL }}
7 changes: 5 additions & 2 deletions deploy/evaluation/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ ARG GOPROXY=https://goproxy.cn,direct

# build arctl
WORKDIR /go/src
COPY . .
COPY cmd cmd
COPY pkg/ pkg/
COPY go.mod go.mod
COPY go.sum go.sum
RUN go env -w GOPROXY=${GOPROXY}
RUN go mod download
RUN go build -o arctl ./cmd/arctl
Expand All @@ -23,7 +26,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \
&& ln -fs /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& dpkg-reconfigure --frontend noninteractive tzdata

# Official: https://pypi.org/simple
# Official: https://pypi.org/simple
ARG PYTHON_INDEX_URL=https://pypi.mirrors.ustc.edu.cn/simple/

WORKDIR /app
Expand Down

0 comments on commit 3e21e1f

Please sign in to comment.