Skip to content

Commit

Permalink
Fix DJL model loading error caused by missing PyTorch dependencies
Browse files Browse the repository at this point in the history
This commit resolves an issue where DJL (Deep Java Library) attempts to download PyTorch dependencies during runtime. Added explicit dependency management for DJL version 0.30.0, including the following modules:
   - pytorch-native-cpu
   - pytorch-jni
   - pytorch-engine
  • Loading branch information
mathieuouillon authored and baltzell committed Jan 10, 2025
1 parent c86a484 commit ea80f18
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@
</repository>
</repositories>


<dependencyManagement>
<dependencies>
<dependency>
<groupId>ai.djl</groupId>
<artifactId>bom</artifactId>
<version>0.30.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<!-- https://mvnrepository.com/artifact/junit/junit -->
<dependency>
Expand Down Expand Up @@ -52,12 +65,40 @@
<version>0.30.0</version>
<scope>compile</scope>
</dependency>

<dependency>
<groupId>ai.djl.pytorch</groupId>
<artifactId>pytorch-model-zoo</artifactId>
<version>0.30.0</version>
</dependency>

<dependency>
<groupId>ai.djl.pytorch</groupId>
<artifactId>pytorch-engine</artifactId>
<version>0.30.0</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>ai.djl.pytorch</groupId>
<artifactId>pytorch-native-cpu</artifactId>
<classifier>linux-x86_64</classifier>
<scope>runtime</scope>
<version>2.4.0</version>
</dependency>

<dependency>
<groupId>ai.djl.pytorch</groupId>
<artifactId>pytorch-jni</artifactId>
<version>2.4.0-0.30.0</version>
<scope>runtime</scope>
</dependency>

<dependency>
<groupId>ai.djl</groupId>
<artifactId>api</artifactId>
</dependency>

</dependencies>

<build>
Expand Down

0 comments on commit ea80f18

Please sign in to comment.