djl

DJL dependency management

This document outlines how DJL manages its dependencies and how developers can find DJL packages they need.

External dependencies

We try our best to minimize the external dependencies. The core DJL library only has 4 external dependencies:

Which DJL package do I need?

Although DJL itself has many packages, but in a real production environment, the minimal dependencies can be:

We don’t recommend include more than one engine into your project unless you need both of them. DJL will load all engines into memory as long as they are in classpath, and those engines usually consume significant of memory.

Using Bill of Materials module (BOM)

To automatically manage DJL packages’ versions, we recommend you use the Bill of Materials. It can simplify your project’s dependency management and make sure Maven picks the compatible versions of DJL modules.

See How to use DJL’s BOM for detail.

List of DJL packages published on Maven Central

Group ID Artifact ID Description
ai.djl api DJL core API, contains top level, engine-agnostic classes for both inference and training
  bom Bill of Materials (BOM), used to manage DJL package dependencies
  basicdataset Contains a collection of built-in datasets
  model-zoo Contains a collection of built-in engine-agnostic models
  serving Contains an universal model server implementation
  examples (deprecated) Contains DJL examples
  repository (deprecated, use api instead) Contain classes for DJL Repository API. The package is moved into api in newer releases
     
ai.djl.mxnet mxnet-engine Apache MXNet engine adapter
  mxnet-model-zoo Contains state of the art Apache MXNet symbolic models
  mxnet-native-auto A placeholder package to automatically download native libraries for your platform
  mxnet-native-mkl(osx-x86_64) Contains Apache MXNet native library for macOS
  mxnet-native-mkl(win-x86_64) Contains Apache MXNet native library for Windows
  mxnet-native-mkl(linux-x86_64) Contains Apache MXNet native library for Linux
  mxnet-native-cu102(linux-x86_64) Contains Apache MXNet native library for Linux with CUDA 10.2
  mxnet-native-cu101(linux-x86_64) Contains Apache MXNet native library for Linux with CUDA 10.1
  mxnet-native-cu92(linux-x86_64) (deprecated) Contains Apache MXNet native library for Linux with CUDA 9.2
     
ai.djl.pytorch pytorch-engine PyTorch engine adapter
  pytorch-model-zoo Contains state of the art PyTorch torch script models
  pytorch-native-auto A placeholder package to automatically download native libraries for your platform
  pytorch-native-cpu(osx-x86_64) Contains PyTorch native library for macOS
  pytorch-native-cpu(win-x86_64) Contains PyTorch native library for Windows
  pytorch-native-cpu(linux-x86_64) Contains PyTorch native library for Linux
  pytorch-native-cu110(linux-x86_64) Contains PyTorch native library for Linux with CUDA 11.0
  pytorch-native-cu110(win-x86_64) Contains PyTorch native library for Windows with CUDA 11.0
  pytorch-native-cu102(linux-x86_64) Contains PyTorch native library for Linux with CUDA 10.2
  pytorch-native-cu102(win-x86_64) Contains PyTorch native library for Windows with CUDA 10.2
  pytorch-native-cu101(linux-x86_64) Contains PyTorch native library for Linux with CUDA 10.1
  pytorch-native-cu101(win-x86_64) Contains PyTorch native library for Windows with CUDA 10.1
  pytorch-native-cu92(linux-x86_64) (deprecated) Contains PyTorch native library for Linux with CUDA 9.2
  pytorch-native-cu92(win-x86_64) (deprecated) Contains PyTorch native library for Windows with CUDA 9.2
  pytorch-engine-precxx11 PyTorch engine adapter specific for precxx11 environment like CentOs 7 and Ubuntu 14.04
  pytorch-native-cpu-precxx11(linux-x86_64) Contains PyTorch native library for centOS 7 and Ubuntu 14.04
     
ai.djl.tensorflow tensorflow-engine TensorFlow engine adapter
  tensorflow-api A redistribution of tensorFlow core java API 2.x
  tensorflow-model-zoo Contains state of the art TensorFlow saved bundle models
  tensorflow-native-auto A placeholder package to automatically download native libraries for your platform
  tensorflow-native-cpu(osx-x86_64) Contains TensorFlow native library for macOS
  tensorflow-native-cpu(linux-x86_64) Contains TensorFlow native library for Linux
  tensorflow-native-cpu(win-x86_64) Contains TensorFlow native library for Windows
  tensorflow-native-cu101(linux-x86_84) Contains TensorFlow native library for Linux with CUDA 10.1
     
ai.djl.onnxruntime onnxruntime-engine ONNX Runtime engine adapter
  onnxruntime-api(deprecated) Please use com.microsoft.onnxruntime:onnxruntime instead
  onnxruntime-native-auto(deprecated) Please use com.microsoft.onnxruntime:onnxruntime instead
  onnxruntime-native-cpu(deprecated) Please use com.microsoft.onnxruntime:onnxruntime instead
     
ai.djl.dlr dlr-engine Neo DLR engine adapter
  dlr-native-auto A placeholder package to automatically download native libraries for your platform
  dlr-native-cpu(osx-x86_64) Contains Neo LR native library for macOS
  dlr-native-cpu(linux-x86_64) Contains Neo DLR native library for Linux
     
ai.djl.android core Contains Android specific utilities (e.g. ImageFactory) for DJL
  pytorch-native Contains DJL PyTorch Android native package
     
ai.djl.aws aws-ai Contains classes that make it easy for DJL to access AWS services
     
ai.djl.fasttext fasttext Contains NLP utility classes NLP for fastText
     
ai.djl.hadoop hadoop Contains classes that make it easy for DJL access HDFS
     
ai.djl.sentencepiece sentencepiece Contains NLP utility classes NLP for SentencePiece