diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index ab8f746dc2..4c9ae8b805 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -45,7 +45,7 @@ jobs: TAG: "openmmlab/lmdeploy:latest-${{matrix.cuda_version}}" steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{github.event.inputs.repo_ref}} - name: Free disk space @@ -96,51 +96,6 @@ jobs: docker tag $TAG $RELEASE_TAG docker push $RELEASE_TAG - publish_dev_docker_image: - runs-on: ubuntu-latest - environment: 'prod' - env: - TAG_PREFIX: "openmmlab/lmdeploy" - TAG: "openmmlab/lmdeploy:dev" - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - ref: ${{github.event.inputs.repo_ref}} - - 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 - git config --local --unset "http.https://github.com/.extraheader" - - name: Login to Docker Hub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Update docker TAG from workflow input - if: github.event_name == 'workflow_dispatch' - run: | - export TAG=$TAG_PREFIX:${{github.event.inputs.image_tag}}-dev - echo $TAG - echo "TAG=${TAG}" >> $GITHUB_ENV - - name: Build and push Docker image - run: | - echo $TAG - docker build . -f docker/Dockerfile -t ${TAG} --build-arg IMAGE_TYPE=dev - docker push $TAG - publish_ascend_docker_image: runs-on: ubuntu-latest environment: 'prod' @@ -149,7 +104,7 @@ jobs: TAG: "openmmlab/lmdeploy:ascend" steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{github.event.inputs.repo_ref}} - name: Free disk space diff --git a/.github/workflows/docker_dev.yml b/.github/workflows/docker_dev.yml new file mode 100644 index 0000000000..5aca101a2a --- /dev/null +++ b/.github/workflows/docker_dev.yml @@ -0,0 +1,53 @@ +name: publish-dev-docker + +on: + workflow_dispatch: + inputs: + repo_ref: + required: false + description: 'Set branch or tag or commit id. Default is "main"' + type: string + default: 'main' + +jobs: + publish_dev_docker_image: + runs-on: ubuntu-latest + environment: 'prod' + env: + TAG: "openmmlab/lmdeploy:dev-cu12.8" + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.repo_ref }} + + - name: Free disk space + uses: jlumbroso/free-disk-space@v1.3.1 + 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 + git config --local --unset "http.https://github.com/.extraheader" + + - 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 $TAG + docker build . -f docker/Dockerfile_dev -t ${TAG} + docker push $TAG