diff --git a/.github/workflows/cuda11.8-whl-release.yml b/.github/workflows/cuda11.8-whl-release.yml deleted file mode 100644 index 2a42a67647..0000000000 --- a/.github/workflows/cuda11.8-whl-release.yml +++ /dev/null @@ -1,121 +0,0 @@ -name: cuda11.8-whl-release - -on: - push: - tags: - - '*' - workflow_dispatch: - -permissions: - contents: write - -jobs: - linux-build: - strategy: - matrix: - pyver: [py39, py310, py311, py312, py313] - runs-on: ubuntu-latest - env: - PYTHON_VERSION: ${{ matrix.pyver }} - PLAT_NAME: manylinux2014_x86_64 - DOCKER_TAG: cuda11.8 - OUTPUT_FOLDER: cuda11.8_dist - CUDA_VER: 11.8 - steps: - - 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: Checkout repository - uses: actions/checkout@v3 - - name: Build - run: | - echo ${PYTHON_VERSION} - echo ${PLAT_NAME} - echo ${DOCKER_TAG} - echo ${OUTPUT_FOLDER} - # remove -it - sed -i 's/docker run --rm -it/docker run --rm/g' builder/manywheel/build_wheel.sh - bash builder/manywheel/build_wheel.sh ${PYTHON_VERSION} ${PLAT_NAME} ${DOCKER_TAG} ${OUTPUT_FOLDER} - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - if-no-files-found: error - path: builder/manywheel/${{ env.OUTPUT_FOLDER }}/* - retention-days: 1 - name: linux-${{ matrix.pyver }} - - windows-build: - strategy: - matrix: - pyver: ['3.9', '3.10', '3.11', '3.12', '3.13'] - runs-on: windows-latest - steps: - - name: Set git for windows - run: | - git config --global core.longpaths true - - name: Checkout repository - uses: actions/checkout@v3 - - name: Set up python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.pyver }} - - name: Install python packages - run: | - pip install build change-wheel-version - - name: Setup CUDA Toolkit - id: cuda-toolkit - shell: pwsh - run: ./builder/windows/setup_cuda.ps1 - env: - INPUT_CUDA_VERSION: '11.8.0' - - name: Build wheel - run: | - python -m build --wheel -o build/wheel - Get-ChildItem -Path "build" -Filter "*.whl" | ForEach-Object { change_wheel_version $_.FullName --local-version cu118 --delete-old-wheel } - - name: Upload Artifacts - uses: actions/upload-artifact@v4 - with: - if-no-files-found: error - path: build/wheel/* - retention-days: 1 - name: windows-${{ matrix.pyver }} - - publish: - runs-on: ubuntu-latest - environment: 'prod' - needs: - - linux-build - - windows-build - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Download artifacts - uses: actions/download-artifact@v4 - with: - path: artifact - merge-multiple: true - - name: Add cuda version to package name - run: | - ver=$(cat lmdeploy/version.py | grep '__version__ =' | cut -d\' -f2) - cuver=$ver+cu118 - ls -lh - cd artifact - for file in *; do - mv "$file" "`echo $file | sed "s/$ver/$cuver/g"`"; - done - - name: Display artifacts - run: ls artifact/ -lh - - name: Publish - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - files: artifact/* diff --git a/.github/workflows/linux-x64-gpu.yml b/.github/workflows/linux-x64-gpu.yml index 1ae24134bc..307c5d2193 100644 --- a/.github/workflows/linux-x64-gpu.yml +++ b/.github/workflows/linux-x64-gpu.yml @@ -29,7 +29,7 @@ jobs: strategy: fail-fast: false matrix: - cudaver: [11.8, 12.4] + cudaver: [12.4, 12.8] name: cuda-${{ matrix.cudaver }} runs-on: ubuntu-latest steps: diff --git a/.github/workflows/windows-x64-gpu.yml b/.github/workflows/windows-x64-gpu.yml index 21afedc73f..bf41f0c137 100644 --- a/.github/workflows/windows-x64-gpu.yml +++ b/.github/workflows/windows-x64-gpu.yml @@ -29,7 +29,7 @@ jobs: strategy: fail-fast: false matrix: - cudaver: [11.8.0, 12.1.0] + cudaver: [12.6.2, 12.8.1] name: cuda-${{ matrix.cudaver }} runs-on: windows-latest steps: diff --git a/builder/manywheel/Dockerfile_2014 b/builder/manywheel/Dockerfile_2014 index f5d41bf0fe..e524c4bb1f 100644 --- a/builder/manywheel/Dockerfile_2014 +++ b/builder/manywheel/Dockerfile_2014 @@ -1,4 +1,3 @@ -# syntax = docker/dockerfile:experimental # WARNING: CentOS 7 is out of date since 6/30/2024, we should use the following one in the future # FROM quay.io/pypa/manylinux_2_28_x86_64 as base FROM quay.io/pypa/manylinux2014_x86_64 as base @@ -33,7 +32,7 @@ RUN /opt/conda/bin/conda tos accept --override-channels --channel https://repo.a RUN PY_VERSIONS=(3.9 3.10 3.11 3.12 3.13) && \ for pyver in "${PY_VERSIONS[@]}"; do \ /opt/conda/bin/conda create -n py${pyver//./} python=${pyver} -yq && \ - /opt/conda/envs/py${pyver//./}/bin/pip install --no-cache-dir pybind11; \ + /opt/conda/envs/py${pyver//./}/bin/pip install -i 'https://mirrors.aliyun.com/pypi/simple/' --no-cache-dir pybind11; \ done && \ /opt/conda/bin/conda clean -ya diff --git a/builder/manywheel/build_all_lmdeploy_builders.sh b/builder/manywheel/build_all_lmdeploy_builders.sh index 53975ee806..3da528d733 100755 --- a/builder/manywheel/build_all_lmdeploy_builders.sh +++ b/builder/manywheel/build_all_lmdeploy_builders.sh @@ -4,6 +4,6 @@ set -eou pipefail TOPDIR=$(git rev-parse --show-toplevel)/builder -for cuda_version in 11.8 12.4 12.8; do +for cuda_version in 12.4 12.6 12.8; do MANY_LINUX_VERSION=2014 GPU_ARCH_VERSION="${cuda_version}" "${TOPDIR}/manywheel/build_lmdeploy_builder.sh" done diff --git a/builder/manywheel/scripts/install_cuda.sh b/builder/manywheel/scripts/install_cuda.sh index 5cacfe12c2..86f1108bbe 100755 --- a/builder/manywheel/scripts/install_cuda.sh +++ b/builder/manywheel/scripts/install_cuda.sh @@ -65,6 +65,27 @@ function install_124 { ldconfig } +function install_126 { + echo "Installing CUDA 12.6 and NCCL 2.24.3" + rm -rf /usr/local/cuda-12.6 /usr/local/cuda + # install CUDA 12.6.3 in the same container + wget -q https://developer.download.nvidia.com/compute/cuda/12.6.3/local_installers/cuda_12.6.3_560.35.05_linux.run + chmod +x cuda_12.6.3_560.35.05_linux.run + ./cuda_12.6.3_560.35.05_linux.run --toolkit --silent + rm -f cuda_12.6.3_560.35.05_linux.run + rm -f /usr/local/cuda && ln -s /usr/local/cuda-12.6 /usr/local/cuda + + # NCCL license: https://docs.nvidia.com/deeplearning/nccl/#licenses + mkdir tmp_nccl && cd tmp_nccl + wget -q https://developer.download.nvidia.com/compute/redist/nccl/v2.24.3/nccl_2.24.3-1+cuda12.6_x86_64.txz + tar xf nccl_2.24.3-1+cuda12.6_x86_64.txz + cp -a nccl_2.24.3-1+cuda12.6_x86_64/include/* /usr/local/cuda/include/ + cp -a nccl_2.24.3-1+cuda12.6_x86_64/lib/* /usr/local/cuda/lib64/ + cd .. + rm -rf tmp_nccl + ldconfig +} + function install_128 { echo "Installing CUDA 12.8 and NCCL 2.25.1" rm -rf /usr/local/cuda-12.8 /usr/local/cuda @@ -101,6 +122,8 @@ do ;; 12.4) install_124 ;; + 12.6) install_126 + ;; 12.8) install_128 ;; *) echo "bad argument $1"; exit 1 diff --git a/builder/windows/setup_cuda.ps1 b/builder/windows/setup_cuda.ps1 index eac2d78fdc..67a3f42fbe 100644 --- a/builder/windows/setup_cuda.ps1 +++ b/builder/windows/setup_cuda.ps1 @@ -26,6 +26,8 @@ if ($CUDA_VERSION_FULL -eq "12.1.0") { $downloadUrl = "https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_522.06_windows.exe" } elseif ($CUDA_VERSION_FULL -eq "12.5.0") { $downloadUrl = "https://developer.download.nvidia.com/compute/cuda/12.5.0/local_installers/cuda_12.5.0_555.85_windows.exe" +} elseif ($CUDA_VERSION_FULL -eq "12.6.2") { + $downloadUrl = "https://developer.download.nvidia.com/compute/cuda/12.6.2/local_installers/cuda_12.6.2_560.94_windows.exe" } elseif ($CUDA_VERSION_FULL -eq "12.8.1") { $downloadUrl = "https://developer.download.nvidia.com/compute/cuda/12.8.1/local_installers/cuda_12.8.1_572.61_windows.exe" } else {