【发布时间】:2021-08-24 09:01:58
【问题描述】:
我想在我的项目中使用深度学习 java 库。但我不能 在我的基于 Spring Boot kotlin Gradle 的项目中设置 AI DJL。我用 Buildgradle.kts ,但我不知道如何添加 ai.djl buildgradle.kts。
【问题讨论】:
标签: spring-boot kotlin djl
我想在我的项目中使用深度学习 java 库。但我不能 在我的基于 Spring Boot kotlin Gradle 的项目中设置 AI DJL。我用 Buildgradle.kts ,但我不知道如何添加 ai.djl buildgradle.kts。
【问题讨论】:
标签: spring-boot kotlin djl
DJL 提供 springboot 启动包,你可以在你的 build.gradle.kts 中添加以下部分:
dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("ai.djl.spring:djl-spring-boot-starter-pytorch-auto:0.11")
implementation("org.springframework.boot:spring-boot-starter-actuator")
testImplementation("org.springframework.boot:spring-boot-starter-test") {
exclude(group = "org.junit.vintage", module = "junit-vintage-engine")
}
// See: https://github.com/awslabs/djl/blob/master/mxnet/mxnet-engine/README.md for MXNet library selection
}
您可以从 github 找到 DJL springboot starter 演示项目:https://github.com/deepjavalibrary/djl-spring-boot-starter-demo
【讨论】: