diff --git a/.github/workflows/native_jni_s3_pytorch.yml b/.github/workflows/native_jni_s3_pytorch.yml index 92840065d9f..8e10cb67004 100644 --- a/.github/workflows/native_jni_s3_pytorch.yml +++ b/.github/workflows/native_jni_s3_pytorch.yml @@ -14,49 +14,6 @@ on: - cron: '0 5 * * *' jobs: - build-pytorch-jni-macos: - if: github.repository == 'deepjavalibrary/djl' - runs-on: macos-13 - - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - distribution: 'corretto' - java-version: 17 - - uses: actions/cache@v4 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('*/build.gradle.kts', 'engines/**/build.gradle.kts', 'extensions/**/build.gradle.kts') }} - restore-keys: | - ${{ runner.os }}-gradle- - - name: Release JNI prep - shell: bash - run: | - PYTORCH_VERSION=${{ github.event.inputs.pt_version }} - export PYTORCH_VERSION=${PYTORCH_VERSION:-$(awk -F '=' '/pytorch/ {gsub(/ ?"/, "", $2); print $2}' gradle/libs.versions.toml)} - echo $PYTORCH_VERSION - if [[ $PYTORCH_VERSION =~ ^(?\.[1-2]?\..*)$ ]]; then \ - ./gradlew :engines:pytorch:pytorch-native:compileJNI -Ppt_version=$PYTORCH_VERSION; \ - ./gradlew -Pjni -Ppt_version=$PYTORCH_VERSION :integration:test "-Dai.djl.default_engine=PyTorch"; \ - fi; - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-2 - - name: Copy files to S3 with the AWS CLI - shell: bash - run: | - PYTORCH_VERSION=${{ github.event.inputs.pt_version }} - PYTORCH_VERSION=${PYTORCH_VERSION:-$(awk -F '=' '/pytorch/ {gsub(/ ?"/, "", $2); print $2}' gradle/libs.versions.toml)} - if [[ $PYTORCH_VERSION =~ ^(?\.[1-2]?\..*)$ ]]; then \ - aws s3 sync engines/pytorch/pytorch-native/jnilib s3://djl-ai/publish/pytorch/${PYTORCH_VERSION}/jnilib; \ - aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/pytorch/${PYTORCH_VERSION}/jnilib*"; \ - fi; - build-pytorch-jni-linux: if: github.repository == 'deepjavalibrary/djl' runs-on: ubuntu-latest @@ -111,48 +68,37 @@ jobs: build-pytorch-jni-precxx11: if: github.repository == 'deepjavalibrary/djl' runs-on: ubuntu-latest - container: nvidia/cuda:12.1.1-cudnn8-devel-centos7 + container: + image: amazonlinux:2 + env: + JAVA_HOME: /usr/lib/jvm/java-17-amazon-corretto + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + timeout-minutes: 30 + needs: create-aarch64-runner steps: - - name: Install Environment + - name: Install compiler environment run: | yum -y update - yum -y install centos-release-scl-rh epel-release - yum -y install devtoolset-9 rh-git218 patch cmake3 - ln -s /usr/bin/cmake3 /usr/bin/cmake + yum -y install patch git cmake3 python3-devel java-17-amazon-corretto-devel + yum -y install gcc10 gcc10-c++ + ln -sf /usr/bin/gcc10-gcc /usr/bin/gcc + ln -sf /usr/bin/gcc10-cc /usr/bin/cc + ln -sf /usr/bin/gcc10-g++ /usr/bin/g++ + ln -sf /usr/bin/gcc10-c++ /usr/bin/c++ + ln -sf /usr/bin/gcc10-ar /usr/bin/ar + ln -sf /usr/bin/cmake3 /usr/bin/cmake pip3 install awscli --upgrade - - uses: actions/checkout@v3 - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - distribution: 'corretto' - java-version: 17 - - uses: actions/cache@v3 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('*/build.gradle.kts', 'engines/**/build.gradle.kts', 'extensions/**/build.gradle.kts') }} - restore-keys: | - ${{ runner.os }}-gradle- + - uses: taiki-e/checkout-action@v1 - name: Release JNI prep run: | - source scl_source enable devtoolset-9 rh-git218 || true + export PATH=$PATH:$JAVA_HOME/bin PYTORCH_VERSION=${{ github.event.inputs.pt_version }} export PYTORCH_VERSION=${PYTORCH_VERSION:-$(awk -F '=' '/pytorch/ {gsub(/ ?"/, "", $2); print $2}' gradle/libs.versions.toml)} - export PYTORCH_PRECXX11=true echo $PYTORCH_VERSION ./gradlew :engines:pytorch:pytorch-native:compileJNI -Pprecxx11 -Ppt_version=$PYTORCH_VERSION + export PYTORCH_PRECXX11=true ./gradlew -Pjni -Ppt_version=$PYTORCH_VERSION :integration:test "-Dai.djl.default_engine=PyTorch" - ./gradlew :engines:pytorch:pytorch-native:cleanJNI - rm -rf ~/.djl.ai - export TORCH_CUDA_ARCH_LIST="8.0 8.6 8.9 9.0" - CUDA_VERSION=${{ github.event.inputs.cuda }} - export CUDA_VERSION=${CUDA_VERSION:-cu121} - ./gradlew :engines:pytorch:pytorch-native:compileJNI -Pcuda=$CUDA_VERSION -Pprecxx11 -Ppt_version=$PYTORCH_VERSION - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v2 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-2 - name: Copy files to S3 with the AWS CLI run: | PYTORCH_VERSION=${{ github.event.inputs.pt_version }} diff --git a/.github/workflows/native_s3_fasttext.yml b/.github/workflows/native_s3_fasttext.yml index c4571ac02ed..9a2a4c704e5 100644 --- a/.github/workflows/native_s3_fasttext.yml +++ b/.github/workflows/native_s3_fasttext.yml @@ -4,36 +4,6 @@ on: workflow_dispatch: jobs: - build-fasttext-jni-osx: - runs-on: macos-13 - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - distribution: 'corretto' - java-version: 17 - - uses: actions/cache@v4 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('*/build.gradle.kts', 'engines/**/build.gradle.kts', 'extensions/**/build.gradle.kts') }} - restore-keys: | - ${{ runner.os }}-gradle- - - name: Release JNI prep - run: | - ./gradlew :extensions:fasttext:compileJNI - ./gradlew -Pjni :extensions:fasttext:test - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-2 - - name: Copy files to S3 with the AWS CLI - run: | - FASTTEXT_VERSION="$(awk -F '=' '/fasttext/ {gsub(/ ?"/, "", $2); print $2}' gradle/libs.versions.toml)" - aws s3 sync extensions/fasttext/jnilib s3://djl-ai/publish/fasttext-${FASTTEXT_VERSION}/jnilib/ - build-fasttext-jni-linux: runs-on: ubuntu-latest container: amazonlinux:2 diff --git a/.github/workflows/native_s3_huggingface.yml b/.github/workflows/native_s3_huggingface.yml index 55ace70eb6c..626ae620755 100644 --- a/.github/workflows/native_s3_huggingface.yml +++ b/.github/workflows/native_s3_huggingface.yml @@ -9,41 +9,6 @@ on: - extensions/tokenizers/rust/** jobs: - build-tokenizers-jni-osx: - runs-on: macos-13 - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - distribution: 'corretto' - java-version: 17 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - uses: actions/cache@v4 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('*/build.gradle.kts', 'engines/**/build.gradle.kts', 'extensions/**/build.gradle.kts') }} - restore-keys: | - ${{ runner.os }}-gradle- - - name: Release JNI prep - run: | - ./gradlew :extensions:tokenizers:compileJNI - PYTORCH_VERSION=2.2.2 ./gradlew -Pjni :extensions:tokenizers:test - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-2 - - name: Copy files to S3 with the AWS CLI - run: | - DJL_VERSION=$(awk -F '=' '/djl / {gsub(/ ?"/, "", $2); print $2}' gradle/libs.versions.toml) - TOKENIZERS_VERSION="$(awk -F '=' '/tokenizers/ {gsub(/ ?"/, "", $2); print $2}' gradle/libs.versions.toml)" - aws s3 sync extensions/tokenizers/jnilib/$DJL_VERSION/osx-x86_64 s3://djl-ai/publish/tokenizers/${TOKENIZERS_VERSION}/jnilib/$DJL_VERSION/osx-x86_64/ - aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/tokenizers/${TOKENIZERS_VERSION}/jnilib/*" - build-tokenizers-jni-linux: runs-on: ubuntu-latest container: diff --git a/.github/workflows/native_s3_sentencepiece.yml b/.github/workflows/native_s3_sentencepiece.yml index 6e102185365..12fca8e12c2 100644 --- a/.github/workflows/native_s3_sentencepiece.yml +++ b/.github/workflows/native_s3_sentencepiece.yml @@ -4,38 +4,6 @@ on: workflow_dispatch: jobs: - build-sentencepiece-jni-osx: - if: ${{ github.repository == 'deepjavalibrary/djl' && always() }} - runs-on: macos-13 - steps: - - uses: actions/checkout@v4 - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - distribution: 'corretto' - java-version: 17 - - uses: actions/cache@v4 - with: - path: ~/.gradle/caches - key: ${{ runner.os }}-gradle-${{ hashFiles('*/build.gradle.kts', 'engines/**/build.gradle.kts', 'extensions/**/build.gradle.kts') }} - restore-keys: | - ${{ runner.os }}-gradle- - - name: Release JNI prep - run: | - ./gradlew :extensions:sentencepiece:compileJNI - ./gradlew -Pjni :extensions:sentencepiece:test - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws-region: us-east-2 - - name: Copy files to S3 with the AWS CLI - run: | - SENTENCEPIECE_VERSION="$(awk -F '=' '/sentencepiece/ {gsub(/ ?"/, "", $2); print $2}' gradle/libs.versions.toml)" - aws s3 sync extensions/sentencepiece/jnilib s3://djl-ai/publish/sentencepiece-${SENTENCEPIECE_VERSION}/jnilib/ - aws cloudfront create-invalidation --distribution-id E371VB8JQ6NRVY --paths "/sentencepiece-${SENTENCEPIECE_VERSION}/jnilib/*" - build-sentencepiece-jni-linux: if: ${{ github.repository == 'deepjavalibrary/djl' && always() }} runs-on: ubuntu-latest diff --git a/.github/workflows/native_s3_xgboost.yml b/.github/workflows/native_s3_xgboost.yml index 47b9a7eb872..1bb89879af6 100644 --- a/.github/workflows/native_s3_xgboost.yml +++ b/.github/workflows/native_s3_xgboost.yml @@ -2,9 +2,10 @@ name: Native S3 XGBoost on: workflow_dispatch: - xgb_version: - description: 'xgboost version' - required: false + inputs: + xgb_version: + description: 'xgboost version' + required: false jobs: create-aarch64-runner: diff --git a/bom/build.gradle.kts b/bom/build.gradle.kts index 9d2813ca775..09ba3dbf399 100644 --- a/bom/build.gradle.kts +++ b/bom/build.gradle.kts @@ -117,7 +117,6 @@ publishing { } val mxnet = libs.versions.mxnet.get() - +"ai.djl.mxnet:mxnet-native-mkl:$mxnet:osx-x86_64" +"ai.djl.mxnet:mxnet-native-mkl:$mxnet:linux-x86_64" +"ai.djl.mxnet:mxnet-native-mkl:$mxnet:win-x86_64" +"ai.djl.mxnet:mxnet-native-cu112mkl:$mxnet:linux-x86_64" @@ -129,13 +128,10 @@ publishing { +"ai.djl.pytorch:pytorch-native-cpu-precxx11:$pytorch:linux-aarch64" +"ai.djl.pytorch:pytorch-native-cu121:$pytorch:linux-x86_64" +"ai.djl.pytorch:pytorch-native-cu121:$pytorch:win-x86_64" - +"ai.djl.pytorch:pytorch-native-cu121-precxx11:$pytorch:linux-x86_64" pytorch = "1.13.1" +"ai.djl.pytorch:pytorch-native-cu117:$pytorch:linux-x86_64" +"ai.djl.pytorch:pytorch-native-cu117:$pytorch:win-x86_64" - +"ai.djl.pytorch:pytorch-native-cu117-precxx11:$pytorch:linux-x86_64" val tensorflow = "${libs.versions.tensorflow.get()}" - +"ai.djl.tensorflow:tensorflow-native-cpu:$tensorflow:osx-x86_64" +"ai.djl.tensorflow:tensorflow-native-cpu:$tensorflow:osx-aarch64" +"ai.djl.tensorflow:tensorflow-native-cpu:$tensorflow:linux-x86_64" +"ai.djl.tensorflow:tensorflow-native-cpu:$tensorflow:linux-aarch64" diff --git a/engines/pytorch/pytorch-engine/README.md b/engines/pytorch/pytorch-engine/README.md index a6fd6f0a920..9145ca23a14 100644 --- a/engines/pytorch/pytorch-engine/README.md +++ b/engines/pytorch/pytorch-engine/README.md @@ -1,6 +1,7 @@ # DJL - PyTorch engine implementation ## Overview + This module contains the Deep Java Library (DJL) EngineProvider for PyTorch. We don't recommend that developers use classes in this module directly. @@ -19,14 +20,17 @@ You can also build the latest javadocs locally using the following command: # for Windows: ..\..\gradlew javadoc ``` + The javadocs output is built in the `build/doc/javadoc` folder. ## Installation + You can pull the PyTorch engine from the central Maven repository by including the following dependency: - ai.djl.pytorch:pytorch-engine:0.29.0 ```xml + ai.djl.pytorch pytorch-engine @@ -42,6 +46,7 @@ ways to specify PyTorch version: 2. Sets environment variable: `PYTORCH_VERSION` to override the default package version. ### Supported PyTorch versions + The following table illustrates which pytorch version that DJL supports: | PyTorch engine version | PyTorch native library version | @@ -74,17 +79,20 @@ The following table illustrates which pytorch version that DJL supports: | pytorch-engine:0.4.0 | pytorch-native-auto:1.4.0 | ### BOM support + We strongly recommend you to use [Bill of Materials (BOM)](../../../bom/README.md) to manage your dependencies. -By default, DJL will download the PyTorch native libraries into [cache folder](../../../docs/development/cache_management.md) the first time you run DJL. +By default, DJL will download the PyTorch native libraries +into [cache folder](../../../docs/development/cache_management.md) the first time you run DJL. It will automatically determine the appropriate jars for your system based on the platform and GPU support. -### CentOS 7 or Amazon Linux 2 support -If you are running on an older operating system (like CentOS 7), you have to use +### Amazon Linux 2 support + +If you are running on an older operating system (like Amazonlinux 2), you have to use [precxx11 build](#for-pre-cxx11-build) or set system property to auto select for precxx11 binary: ```java -System.setProperty("PYTORCH_PRECXX11", "true"); +System.setProperty("PYTORCH_PRECXX11","true"); ``` or use System env @@ -114,36 +122,21 @@ export PYTORCH_FLAVOR=cpu ``` ### macOS -For macOS, you can use the following library: - -- ai.djl.pytorch:pytorch-jni:2.3.1-0.29.0 -- ai.djl.pytorch:pytorch-native-cpu:2.3.1:osx-x86_64 -```xml - - ai.djl.pytorch - pytorch-native-cpu - osx-x86_64 - 2.3.1 - runtime - - - ai.djl.pytorch - pytorch-jni - 2.3.1-0.29.0 - runtime - -``` +**Note:** -**Note:** PyTorch 1.13+ doesn't support mac 11 any more, you must use DJL 0.19.0 ane lower version. +- x86_64 macOS is no longer supported since 0.30.0 +- PyTorch 1.13+ doesn't support mac 11 any more, you must use DJL 0.19.0 ane lower version. ### macOS M1 + For macOS M1, you can use the following library: - ai.djl.pytorch:pytorch-jni:2.3.1-0.29.0 - ai.djl.pytorch:pytorch-native-cpu:2.3.1:osx-aarch64 ```xml + ai.djl.pytorch pytorch-native-cpu @@ -152,14 +145,15 @@ For macOS M1, you can use the following library: runtime - ai.djl.pytorch - pytorch-jni - 2.3.1-0.29.0 - runtime +ai.djl.pytorch +pytorch-jni +2.3.1-0.29.0 +runtime ``` ### Linux + For the Linux platform, you can choose between CPU, GPU. If you have NVIDIA [CUDA](https://en.wikipedia.org/wiki/CUDA) installed on your GPU machine, you can use one of the following library: @@ -169,6 +163,7 @@ installed on your GPU machine, you can use one of the following library: - ai.djl.pytorch:pytorch-native-cu121:2.3.1:linux-x86_64 - CUDA 12.1 ```xml + ai.djl.pytorch pytorch-native-cu121 @@ -177,10 +172,10 @@ installed on your GPU machine, you can use one of the following library: runtime - ai.djl.pytorch - pytorch-jni - 2.3.1-0.29.0 - runtime +ai.djl.pytorch +pytorch-jni +2.3.1-0.29.0 +runtime ``` @@ -190,6 +185,7 @@ installed on your GPU machine, you can use one of the following library: - ai.djl.pytorch:pytorch-native-cpu:2.3.1:linux-x86_64 ```xml + ai.djl.pytorch pytorch-native-cpu @@ -198,10 +194,10 @@ installed on your GPU machine, you can use one of the following library: 2.3.1 - ai.djl.pytorch - pytorch-jni - 2.3.1-0.29.0 - runtime +ai.djl.pytorch +pytorch-jni +2.3.1-0.29.0 +runtime ``` @@ -211,6 +207,7 @@ installed on your GPU machine, you can use one of the following library: - ai.djl.pytorch:pytorch-native-cpu-precxx11:2.3.1:linux-aarch64 ```xml + ai.djl.pytorch pytorch-native-cpu-precxx11 @@ -219,30 +216,26 @@ installed on your GPU machine, you can use one of the following library: 2.3.1 - ai.djl.pytorch - pytorch-jni - 2.3.1-0.29.0 - runtime +ai.djl.pytorch +pytorch-jni +2.3.1-0.29.0 +runtime ``` ### For Pre-CXX11 build -We also provide packages for the system like CentOS 7/Ubuntu 14.04 with GLIBC >= 2.17. -All the package were built with GCC 7, we provided a newer `libstdc++.so.6.24` in the package that contains `CXXABI_1.3.9` to use the package successfully. +**Note:** precxx11 GPU build is no longer support since 0.30.0, + +We also provide packages for the system like Amazonliunx 2 with GLIBC >= 2.17. +All the package were built with GCC 7, we provided a newer `libstdc++.so.6.24` in the package that +contains `CXXABI_1.3.9` to use the package successfully. - ai.djl.pytorch:pytorch-jni:2.3.1-0.29.0 -- ai.djl.pytorch:pytorch-native-cu121-precxx11:2.3.1:linux-x86_64 - CUDA 12.1 -- ai.djl.pytorch:pytorch-native-cpu-precxx11:2.3.1:linux-x86_64 - CPU +- ai.djl.pytorch:pytorch-native-cpu-precxx11:2.3.1:linux-x86_64 - CPU ```xml - - ai.djl.pytorch - pytorch-native-cu121-precxx11 - linux-x86_64 - 2.3.1 - runtime - + ai.djl.pytorch pytorch-jni @@ -252,6 +245,7 @@ All the package were built with GCC 7, we provided a newer `libstdc++.so.6.24` i ``` ```xml + ai.djl.pytorch pytorch-native-cpu-precxx11 @@ -260,10 +254,10 @@ All the package were built with GCC 7, we provided a newer `libstdc++.so.6.24` i runtime - ai.djl.pytorch - pytorch-jni - 2.3.1-0.29.0 - runtime +ai.djl.pytorch +pytorch-jni +2.3.1-0.29.0 +runtime ``` @@ -271,7 +265,8 @@ All the package were built with GCC 7, we provided a newer `libstdc++.so.6.24` i PyTorch requires Visual C++ Redistributable Packages. If you encounter an UnsatisfiedLinkError while using DJL on Windows, please download and install -[Visual C++ 2019 Redistributable Packages](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) and reboot. +[Visual C++ 2019 Redistributable Packages](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads) +and reboot. For the Windows platform, you can choose between CPU and GPU. @@ -281,6 +276,7 @@ For the Windows platform, you can choose between CPU and GPU. - ai.djl.pytorch:pytorch-native-cu121:2.3.1:win-x86_64 - CUDA 12.1 ```xml + ai.djl.pytorch pytorch-native-cu121 @@ -289,10 +285,10 @@ For the Windows platform, you can choose between CPU and GPU. runtime - ai.djl.pytorch - pytorch-jni - 2.3.1-0.29.0 - runtime +ai.djl.pytorch +pytorch-jni +2.3.1-0.29.0 +runtime ``` @@ -302,6 +298,7 @@ For the Windows platform, you can choose between CPU and GPU. - ai.djl.pytorch:pytorch-native-cpu:2.3.1:win-x86_64 ```xml + ai.djl.pytorch pytorch-native-cpu @@ -310,9 +307,9 @@ For the Windows platform, you can choose between CPU and GPU. 2.3.1 - ai.djl.pytorch - pytorch-jni - 2.3.1-0.29.0 - runtime +ai.djl.pytorch +pytorch-jni +2.3.1-0.29.0 +runtime ``` diff --git a/engines/pytorch/pytorch-jni/build.gradle.kts b/engines/pytorch/pytorch-jni/build.gradle.kts index d99ab8bec55..bcbe8250f4f 100644 --- a/engines/pytorch/pytorch-jni/build.gradle.kts +++ b/engines/pytorch/pytorch-jni/build.gradle.kts @@ -34,29 +34,17 @@ tasks { ) + when { ptVersion.startsWith("2.3.") -> listOf( "linux-x86_64/cu121/libdjl_torch.so", - "linux-x86_64/cu121-precxx11/libdjl_torch.so", "win-x86_64/cu121/djl_torch.dll" ) ptVersion.startsWith("2.1.") || ptVersion.startsWith("2.2.") -> listOf( "linux-x86_64/cu121/libdjl_torch.so", - "linux-x86_64/cu121-precxx11/libdjl_torch.so", "win-x86_64/cu121/djl_torch.dll", - "osx-x86_64/cpu/libdjl_torch.dylib" - ) - - ptVersion.startsWith("2.0.") -> listOf( - "linux-x86_64/cu118/libdjl_torch.so", - "linux-x86_64/cu118-precxx11/libdjl_torch.so", - "win-x86_64/cu118/djl_torch.dll", - "osx-x86_64/cpu/libdjl_torch.dylib" ) ptVersion.startsWith("1.13.") -> listOf( "linux-x86_64/cu117/libdjl_torch.so", - "linux-x86_64/cu117-precxx11/libdjl_torch.so", "win-x86_64/cu117/djl_torch.dll", - "osx-x86_64/cpu/libdjl_torch.dylib" ) else -> throw GradleException("Unsupported version: $ptVersion.") diff --git a/engines/tensorflow/tensorflow-native/build.gradle.kts b/engines/tensorflow/tensorflow-native/build.gradle.kts index b6b2bd30dd1..ee2074e352b 100644 --- a/engines/tensorflow/tensorflow-native/build.gradle.kts +++ b/engines/tensorflow/tensorflow-native/build.gradle.kts @@ -42,7 +42,6 @@ tasks { val aarch64Url = "https://publish.djl.ai/tensorflow/${libs.versions.tensorflow.get()}/linux-arm64.jar" "${url}-macosx-arm64.jar".url unzipInto dir / "cpu/osx-aarch64/native/lib" - "${url}-macosx-x86_64.jar".url unzipInto dir / "cpu/osx-x86_64/native/lib" "${url}-windows-x86_64.jar".url unzipInto dir / "cpu/win-x86_64/native/lib" "${url}-linux-x86_64.jar".url unzipInto dir / "cpu/linux-x86_64/native/lib" "${url}-linux-x86_64-gpu.jar".url unzipInto dir / "cu121/linux-x86_64/native/lib" diff --git a/extensions/audio/build.gradle.kts b/extensions/audio/build.gradle.kts index ca7a59bbf4d..ee9caa190c0 100644 --- a/extensions/audio/build.gradle.kts +++ b/extensions/audio/build.gradle.kts @@ -26,7 +26,6 @@ dependencies { } api(libs.wendykierp.jTransforms) - runtimeOnly(libs.bytedeco.ffmpeg) { artifact { classifier = "macosx-x86_64" } } runtimeOnly(libs.bytedeco.ffmpeg) { artifact { classifier = "linux-x86_64" } } runtimeOnly(libs.bytedeco.ffmpeg) { artifact { classifier = "windows-x86_64" } } runtimeOnly(libs.bytedeco.ffmpeg) { artifact { classifier = "macosx-arm64" } } diff --git a/extensions/fasttext/build.gradle.kts b/extensions/fasttext/build.gradle.kts index c17b83d7145..1c8f463e5bb 100644 --- a/extensions/fasttext/build.gradle.kts +++ b/extensions/fasttext/build.gradle.kts @@ -28,7 +28,6 @@ tasks { "https://publish.djl.ai/fasttext-${libs.versions.fasttext.get()}/jnilib/${libs.versions.djl.get()}" val files = mapOf( "linux-x86_64" to "libjni_fasttext.so", - "osx-x86_64" to "libjni_fasttext.dylib", "osx-aarch64" to "libjni_fasttext.dylib" ) val jnilibDir = project.projectDir / "jnilib/${libs.versions.djl.get()}" diff --git a/extensions/sentencepiece/build.gradle.kts b/extensions/sentencepiece/build.gradle.kts index c634ba15494..ca484d357ee 100644 --- a/extensions/sentencepiece/build.gradle.kts +++ b/extensions/sentencepiece/build.gradle.kts @@ -27,7 +27,6 @@ tasks { "win-x86_64" to "sentencepiece_native.dll", "linux-x86_64" to "libsentencepiece_native.so", "linux-aarch64" to "libsentencepiece_native.so", - "osx-x86_64" to "libsentencepiece_native.dylib", "osx-aarch64" to "libsentencepiece_native.dylib" ) val jnilibDir = project.projectDir / "jnilib/${libs.versions.djl.get()}" diff --git a/extensions/tokenizers/build.gradle.kts b/extensions/tokenizers/build.gradle.kts index c5410f83695..2e63b7da572 100644 --- a/extensions/tokenizers/build.gradle.kts +++ b/extensions/tokenizers/build.gradle.kts @@ -45,7 +45,6 @@ tasks { "win-x86_64/cpu/tokenizers.dll" to "$tokenizers/jnilib/$djl", "linux-x86_64/cpu/libtokenizers.so" to "$tokenizers/jnilib/$djl", "linux-aarch64/cpu/libtokenizers.so" to "$tokenizers/jnilib/$djl", - "osx-x86_64/cpu/libtokenizers.dylib" to "$tokenizers/jnilib/$djl", "osx-aarch64/cpu/libtokenizers.dylib" to "$tokenizers/jnilib/$djl" ) val jnilibDir = project.projectDir / "jnilib/$djl"