Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/Dockerfile.latest
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM python:3.12

# Install git and install veadk-python via git
RUN apt-get install -y git && \
pip3 install --no-cache-dir git+https://github.com/volcengine/veadk-python.git && \
apt-get clean && rm -rf /var/lib/apt/lists/*
20 changes: 20 additions & 0 deletions .github/Dockerfile.preview
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

FROM python:3.12

# Install git and install veadk-python via git
RUN apt-get install -y git && \
pip3 install --no-cache-dir git+https://github.com/volcengine/veadk-python.git && \
apt-get clean && rm -rf /var/lib/apt/lists/*
64 changes: 64 additions & 0 deletions .github/workflows/latest-image-to-ark-cr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Push Latest Image to ARK Registry

on:
push:
# Trigger only when pushing tags
tags:
- '*'
workflow_dispatch:

jobs:
build-and-push:
runs-on: ubuntu-latest
# This job is executed only when the repository is the main repository.
if: github.repository == 'volcengine/veadk-python'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Volcengine Container Registry
uses: docker/login-action@v3
with:
registry: veadk-cn-beijing.cr.volces.com
username: ${{ secrets.ARK_CR_USERNAME }}
password: ${{ secrets.ARK_CR_PASSWORD }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: veadk-cn-beijing.cr.volces.com/veadk/veadk-python
tags: |
latest
type=ref,event=tag


- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: .github/Dockerfile.latest
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
60 changes: 60 additions & 0 deletions .github/workflows/preview-image-to-ark-cr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright (c) 2025 Beijing Volcano Engine Technology Co., Ltd. and/or its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Push Preview Image to ARK Registry

on:
push:
branches: [ main ]
workflow_dispatch:

jobs:
build-and-push:
runs-on: ubuntu-latest
# This job is executed only when the repository is the main repository.
if: github.repository == 'volcengine/veadk-python'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to Volcengine Container Registry
uses: docker/login-action@v3
with:
registry: veadk-cn-beijing.cr.volces.com
username: ${{ secrets.ARK_CR_USERNAME }}
password: ${{ secrets.ARK_CR_PASSWORD }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: veadk-cn-beijing.cr.volces.com/veadk/veadk-python
tags: |
preview

- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
file: .github/Dockerfile.preview
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max