sbrunk / storch

GPU accelerated deep learning and numeric computing for Scala 3.
https://storch.dev
Apache License 2.0
113 stars 7 forks source link

Importing Storch release #66

Closed davidedomini closed 10 months ago

davidedomini commented 10 months ago

Hello,

I was trying to import Storch from the OSS Sonatype Snapshot Repository as indicated in your documentation.

Everything works fine when using SBT, but theoretically, it should also work with Gradle (properly configured). However, when attempting to import it with Gradle, the following error is encountered:

storch-example:main: Could not find dev.storch:core:0.0-05078a8-SNAPSHOT.
Searched in the following locations:
  - https://repo.maven.apache.org/maven2/dev/storch/core/0.0-05078a8-SNAPSHOT/maven-metadata.xml
  - https://repo.maven.apache.org/maven2/dev/storch/core/0.0-05078a8-SNAPSHOT/core-0.0-05078a8-SNAPSHOT.pom
  - https://oss.sonatype.org/content/repositories/snapshots/dev/storch/core/0.0-05078a8-SNAPSHOT/maven-metadata.xml
  - https://oss.sonatype.org/content/repositories/snapshots/dev/storch/core/0.0-05078a8-SNAPSHOT/core-0.0-05078a8-SNAPSHOT.pom

Here you can find a minimal reproducible example

I've tried to investigate this error, and I found some strange things:

  1. Using a custom SBT task, I printed the link to the repository that the code Resolver.sonatypeOssRepos("snapshots") points to, and obtained the following link: https://oss.sonatype.org/content/repositories/snapshots . However, if you access the repository from a browser and try to navigate it, Storch cannot be found.

  2. If you try to import another software (e.g., "dev.jeka:kotlin-plugin:master-SNAPSHOT") published on the same repository from Gradle, everything works fine (indicating that the Gradle build is configured correctly).

sbrunk commented 10 months ago

Storch is published to the "new" snapshots repo s01: https://s01.oss.sonatype.org/#nexus-search;gav~dev.storch

The SBT Resolver picks up both if you configure Resolver.sonatypeOssRepos("snapshots"), but I guess you have to do it manually in gradle (see also the scala-cli tab).

Since you've already closed it, did you figure it out already? If you have a working gradle build, I'd be happy to add an example to the docs for the next person running into this.

davidedomini commented 10 months ago

Hi Sören, Here it is: https://github.com/davidedomini/storch-example

davidedomini commented 10 months ago

N.B. regarding org.bytedeco.cuda

Importing with the version indicated in storch documentation doesn't work (that is why I used another one)