2015-10-19 91 views
2

我有麻煩用sbt導入本地庫。sbt導入本地庫

這是我正在嘗試導入的庫https://github.com/deeplearning4j/nd4s

我遵循github上的指示,我做了sbt +publish-local

如果我理解正確的庫現在應該在我的本地庫,我可以把它看作:

lucas-MacBook-Pro:~ donbeo$ cd .ivy2/local/org.nd4j/nd4s_2.1 
nd4s_2.10/  nd4s_2.11/  nd4s_2.12.0-M1/ 

現在我該怎樣導入我的項目?

This is my current `build.sbt` but it is not working. 


name := "deeplearning4j-examples-scala" 

version := "1.0" 

scalaVersion := "2.10.4" 

lazy val root = project.in(file(".")) 

libraryDependencies ++= Seq(
    "commons-io" % "commons-io" % "2.4", 
    "com.google.guava" % "guava" % "18.0", 
    "org.deeplearning4j" % "deeplearning4j-core" % "0.4-rc3.4", 
    "org.deeplearning4j" % "deeplearning4j-nlp" % "0.4-rc3.4", 
    "org.deeplearning4j" % "deeplearning4j-ui" % "0.4-rc3.4", 
    "org.jblas" % "jblas" % "1.2.4", 
    "org.nd4j" % "canova-nd4j-image" % "0.0.0.11", 
    "org.nd4j" % "nd4j-jblas" % "0.4-rc3.5", 
    "org.nd4j" % "nd4j-x86" % "0.4-rc3.5", 
    "org.jfree" % "jfreechart" % "1.0.14", 
    "com.github.wookietreiber" %% "scala-chart" % "latest.integration" 
) 

resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots" 

resolvers += "Sonatype release Repository" at "http://oss.sonatype.org/service/local/staging/deploy/maven2/" 

resolvers += "Local Maven Repository" at "file://"+Path.userHome.absolutePath+"/.m2/repository/" 


libraryDependencies ++= Seq(
    // other dependencies here 
    "org.scalanlp" %% "breeze" % "0.11.2", 
    // native libraries are not included by default. add this if you want them (as of 0.7) 
    // native libraries greatly improve performance, but increase jar sizes. 
    // It also packages various blas implementations, which have licenses that may or may not 
    // be compatible with the Apache License. No GPL code, as best I know. 
    "org.scalanlp" %% "breeze-natives" % "0.11.2", 
    // the visualization library is distributed separately as well. 
    // It depends on LGPL code. 
    "org.scalanlp" %% "breeze-viz" % "0.11.2" 
) 

libraryDependencies += "com.nd4j" %% "nd4s" % "2.11" // NOT WORKING 

resolvers ++= Seq(
    // other resolvers here 
    // if you want to use snapshot builds (currently 0.12-SNAPSHOT), use this. 
    "Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/", 
    "Sonatype Releases" at "https://oss.sonatype.org/content/repositories/releases/" 
) 

5行在結束之前有我嘗試導入庫。

回答

3

build.sbtlibraryDependencies

libraryDependencies += "org.nd4j" %% "nd4s" % "0.4-rc3"