@@ -59,7 +59,7 @@ object JniCrossPackage extends AutoPlugin {
5959 import JniNative .autoImport ._
6060
6161 lazy val settings : Seq [Setting [_]] = Seq (
62- nativePlatforms := Set (LINUX_x86_64 , LINUX_GPU_x86_64 , WINDOWS_x86_64 , DARWIN_x86_64 ),
62+ nativePlatforms := Set (LINUX , WINDOWS , DARWIN ),
6363 target := (target in Compile ).value / " native" ,
6464 nativeLibPath := {
6565 val targetDir = (target in nativeCrossCompile).value
@@ -97,16 +97,16 @@ object JniCrossPackage extends AutoPlugin {
9797 log.info(s " Using ' $baseDir' as the base directory. " )
9898 val platformTargetDir = targetDir / platform.name
9999
100- // TODO: Uncomment this once we properly sort out cross-compilation.
101100// IO.createDirectory(platformTargetDir)
102101// IO.createDirectory(platformTargetDir / "code")
103102// IO.createDirectory(platformTargetDir / "docker")
104103// IO.createDirectory(platformTargetDir / "lib")
105104//
106105// platform match {
106+ // // TODO: Figure out the right cross-compilation story.
107107// // For Windows, we expect the binaries to have already been built and placed in the `bin` and the `lib`
108108// // subdirectories, because we currently have no way to cross-compile.
109- // case WINDOWS_x86_64 | WINDOWS_GPU_x86_64 =>
109+ // case WINDOWS =>
110110// if (!(platformTargetDir / "bin").exists()) {
111111// throw new IllegalStateException("The Windows binaries must have already been prebuilt.")
112112// }
@@ -119,7 +119,8 @@ object JniCrossPackage extends AutoPlugin {
119119// dockerContainer = dockerContainer,
120120// srcDir = (baseDirectory.value / "src" / "main" / "native").getPath,
121121// tgtDir = platformTargetDir.getPath,
122- // libPath = nativeLibPath.value(platform).getPath).map(_ ! log)
122+ // libPath = nativeLibPath.value(platform).getPath,
123+ // ).map(_ ! log)
123124//
124125// // Clean up.
125126// log.info("Cleaning up after build.")
@@ -206,7 +207,6 @@ object JniCrossPackage extends AutoPlugin {
206207
207208 sealed trait Platform {
208209 val name : String
209- val tag : String
210210 val dockerImage : String = " "
211211 val cMakePath : String = " /usr/bin"
212212 val cMakeLibPath : String = " /usr/lib"
@@ -253,31 +253,17 @@ object JniCrossPackage extends AutoPlugin {
253253 override def toString : String = name
254254 }
255255
256- object LINUX_x86_64 extends Platform {
257- override val name : String = " linux-x86_64"
258- override val tag : String = " linux-cpu-x86_64"
256+ object LINUX extends Platform {
257+ override val name : String = " linux"
259258 override val dockerImage : String = " eaplatanios/tensorflow_scala:linux-cpu-x86_64-0.5.3"
260259 }
261260
262- object LINUX_GPU_x86_64 extends Platform {
263- override val name : String = " linux-gpu-x86_64"
264- override val tag : String = " linux-gpu-x86_64"
265- override val dockerImage : String = " eaplatanios/tensorflow_scala:linux-gpu-x86_64-0.5.3"
261+ object WINDOWS extends Platform {
262+ override val name : String = " windows"
266263 }
267264
268- object WINDOWS_x86_64 extends Platform {
269- override val name : String = " windows-x86_64"
270- override val tag : String = " windows-cpu-x86_64"
271- }
272-
273- object WINDOWS_GPU_x86_64 extends Platform {
274- override val name : String = " windows-gpu-x86_64"
275- override val tag : String = " windows-gpu-x86_64"
276- }
277-
278- object DARWIN_x86_64 extends Platform {
279- override val name : String = " darwin-x86_64"
280- override val tag : String = " darwin-cpu-x86_64"
265+ object DARWIN extends Platform {
266+ override val name : String = " darwin"
281267
282268 override def build (
283269 dockerImage : String ,
0 commit comments