djl

DJL - Apache MXNet native library

This module contains DJL released Apache MXNet binary files. The source of binary can be traced from the following two ways:

Publishing the Apache MXNet native library

Step 1: Prepare the MXNet native library

Extract the Apache MXNet native library files from the Apache MXNet python pip wheel or build them from source. Make sure to collect all the dependencies. Use the following commands to include all the libmxnet.so dependencies:

# osx
otool -L libmxnet.dylib

# ubuntu
ldd libmxnet.so

# Windows
dumpbin /dependents libmxnet.dll

The example dependencies list for macOS mkl is:

The example dependencies list for Windows mkl is:

The example dependencies list for Linux mkl is:

Step 2: Upload files to the s3 bucket

The example list of the s3 files is:

Step 3: Test publishing

Run the following commands to prepare your package:

cd mxnet/native

# Download the native files and put them into the right folder
./gradlew dMNL

# Change the mxnet-native version in gradle.properties

# There are three ways to build the new mxnet-native package for testing

1. Publish to local build/repo folder
./gradlew publish

2. Publish to staging and use the new URL to test it
./gradlew publish -Pstaging

3. Publish to staging via the Github action
# Run the workflow from the web portal

# Test with the SSD Apache MXNet model
./gradlew :example:run

# After testing all three platforms(osx, linux, win), you can publish the package through sonatype.

Optional: Use GitHub actions to publish the Apache MXNet native library

We have a weekly GitHub pipeline that publishes the snapshots automatically. The pipeline can also be manually triggered using the GitHub Actions web portal