| name: test-docker |
|
|
| on: |
| push: |
| paths: |
| - 'docker/**' |
| - '.github/workflows/*docker.yml' |
| pull_request: |
| paths: |
| - 'docker/**' |
| - '.github/workflows/*docker.yml' |
|
|
| concurrency: |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| cancel-in-progress: true |
|
|
| jobs: |
| test_docker_image: |
| permissions: |
| pull-requests: write |
| runs-on: ubuntu-latest |
| strategy: |
| matrix: |
| cuda_version: [cu13, cu12] |
| python_version: ['3.10', '3.11', '3.12', '3.13'] |
| env: |
| CUDA_VERSION: ${{ matrix.cuda_version }} |
| PYTHON_VERSION: ${{ matrix.python_version }} |
| 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: |
| |
| tool-cache: false |
| docker-images: false |
| |
| 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: Build Docker image |
| run: | |
| docker build . -t lmdeploy:latest -f docker/Dockerfile --build-arg CUDA_VERSION=${CUDA_VERSION} --build-arg PYTHON_VERSION=${PYTHON_VERSION} |
| - name: Test image with lmdeploy check_env |
| run: | |
| docker images |
| docker run --rm lmdeploy:latest lmdeploy check_env |
| - name: Dive |
| if: ${{ matrix.cuda_version == 'cu12' }} |
| uses: MaxymVlasov/dive-action@v1.5.0 |
| with: |
| image: lmdeploy:latest |
| github-token: ${{ secrets.GITHUB_TOKEN }} |
|
|
| test_ascend_docker_image: |
| permissions: |
| pull-requests: write |
| runs-on: ubuntu-22.04-arm |
| 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: |
| |
| tool-cache: false |
| docker-images: false |
| |
| android: true |
| dotnet: true |
| haskell: true |
| large-packages: true |
| swap-storage: false |
| - name: Set up Docker Buildx |
| uses: docker/setup-buildx-action@v3 |
| - name: Get docker info |
| run: | |
| docker info |
| # remove http extraheader |
| git config --local --unset "http.https://github.com/.extraheader" |
| - name: Build Docker image |
| run: | |
| docker build . -t lmdeploy:ascend -f docker/Dockerfile_ascend_a3 |
| |
| |
| |
| |
| - name: Dive |
| uses: MaxymVlasov/dive-action@v1.5.0 |
| with: |
| image: lmdeploy:ascend |
| github-token: ${{ secrets.GITHUB_TOKEN }} |
|
|
| test_jetson_docker_image: |
| permissions: |
| pull-requests: write |
| runs-on: ubuntu-22.04-arm |
| 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: |
| |
| tool-cache: false |
| docker-images: false |
| |
| android: true |
| dotnet: true |
| haskell: true |
| large-packages: true |
| swap-storage: false |
| - name: Set up Docker Buildx |
| uses: docker/setup-buildx-action@v3 |
| - name: Get docker info |
| run: | |
| docker info |
| # remove http extraheader |
| git config --local --unset "http.https://github.com/.extraheader" |
| - name: Build Docker image |
| run: | |
| docker build . -t lmdeploy:jetson -f docker/Dockerfile.jetson |
| - name: Test image with lmdeploy check_env |
| run: | |
| docker images |
| docker run --rm lmdeploy:jetson lmdeploy check_env |
| - name: Dive |
| uses: MaxymVlasov/dive-action@v1.5.0 |
| with: |
| image: lmdeploy:jetson |
| github-token: ${{ secrets.GITHUB_TOKEN }} |
|
|