Skip to content
Open
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
66 changes: 66 additions & 0 deletions .github/workflows/docker-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: publish-docker-nightly

on:
workflow_dispatch:
inputs:
repo_ref:
required: false
description: 'Set branch or tag or commit id. Default is "main"'
type: string
default: 'main'
schedule:
- cron: '00 8 * * 0-4'

env:
TAG: "openmmlab/lmdeploy:nightly-cu12.8"

jobs:
publish_docker_image:
runs-on: ubuntu-latest
env:
CUDA_VERSION: "cu12.8"
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ github.event.inputs.repo_ref || 'main' }}
- name: Free disk space
uses: jlumbroso/free-disk-space@main
with:
# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
tool-cache: false
docker-images: false
# All of these default to true, but feel free to set to "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: false
- name: Get docker info
run: |
docker info
# remove http extraheader (tolerate missing key)
git config --local --unset "http.https://github.com/.extraheader" || true
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Docker image
run: |
echo ${{ env.TAG }}
docker build . -f docker/Dockerfile -t ${{ env.TAG }} --build-arg CUDA_VERSION=${{ env.CUDA_VERSION }}
docker push ${{ env.TAG }}

publish_inner_docker_image:
runs-on: image-sync-inner
needs: publish_docker_image
env:
INNER_TAG: "registry.h.pjlab.org.cn/ailab-puyu-puyu_gpu/lmdeploy:nightly-cu12.8"
steps:
- name: Pull and push to inner
run: |
docker pull ${{ env.TAG }}
docker login registry.h.pjlab.org.cn -p ${{ secrets.CLUSTER_DOCKERHUB_TOKEN }} -u ${{ secrets.CLUSTER_DOCKERHUB_USERNAME }}
docker tag ${{ env.TAG }} ${{ env.INNER_TAG }}
docker push ${{ env.INNER_TAG }}
15 changes: 15 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,18 @@ jobs:
echo $TAG
docker build . -t ${TAG} -f docker/Dockerfile_ascend_a3 --platform linux/arm64
docker push $TAG

publish_inner_docker_image:
needs: publish_docker_image
runs-on: image-sync-inner
environment: 'prod'
env:
TAG: "openmmlab/lmdeploy:latest-cu12.8"
INNER_TAG: "registry.h.pjlab.org.cn/ailab-puyu-puyu_gpu/lmdeploy:${{github.event.inputs.image_tag}}-cu12.8"
steps:
- name: Pull and push to inner
run: |
docker pull ${{ env.TAG }}
docker login registry.h.pjlab.org.cn -p ${{ secrets.CLUSTER_DOCKERHUB_TOKEN }} -u ${{ secrets.CLUSTER_DOCKERHUB_USERNAME }}
docker tag ${{ env.TAG }} ${{ env.INNER_TAG }}
docker push ${{ env.INNER_TAG }}
Loading