Build Tools (Gradle, SBT)
Configuring Deeplearning4j with Gradle, SBT, and other build tools
Overview
Gradle
Groovy DSL (build.gradle)
plugins {
id 'java'
}
repositories {
mavenCentral()
}
ext {
dl4jVersion = '1.0.0-M2.1'
}
dependencies {
// Core DL4J
implementation "org.deeplearning4j:deeplearning4j-core:${dl4jVersion}"
// CPU backend (replace with nd4j-cuda-11.6-platform for GPU)
implementation "org.nd4j:nd4j-native-platform:${dl4jVersion}"
// Logging
implementation 'ch.qos.logback:logback-classic:1.2.11'
}Kotlin DSL (build.gradle.kts)
GPU with Gradle
Additional Modules with Gradle
Dependency Resolution in Gradle
Gradle and Snapshot Builds
SBT
build.sbt
SBT with GPU
SBT Resolvers for Snapshots
SBT Assembly (fat JAR)
Leiningen (Clojure)
Leiningen with GPU
Leiningen Snapshots
Ivy
Dependency Resolution Tips
Verify which backend is loaded
Common build issues
Related Pages
Last updated
Was this helpful?