From 7192d3da37d107982f63bd08d043c386d3f24891 Mon Sep 17 00:00:00 2001 From: Zach Kimberg Date: Mon, 28 Jan 2019 15:16:01 -0800 Subject: [PATCH 1/4] Remove all usages of makefile for scala --- ci/docker/runtime_functions.sh | 5 +++-- docker/Dockerfiles/Dockerfile.in.scala | 2 +- docs/install/java_setup.md | 2 +- docs/install/scala_setup.md | 4 ++-- docs/mxdoc.py | 3 +-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh index d97da64d9735..6b5857b51e6a 100755 --- a/ci/docker/runtime_functions.sh +++ b/ci/docker/runtime_functions.sh @@ -870,8 +870,9 @@ unittest_ubuntu_cpu_clojure() { unittest_ubuntu_cpu_clojure_integration() { set -ex - make scalapkg USE_OPENCV=1 USE_BLAS=openblas USE_DIST_KVSTORE=1 ENABLE_TESTCOVERAGE=1 - make scalainstall USE_OPENCV=1 USE_BLAS=openblas USE_DIST_KVSTORE=1 ENABLE_TESTCOVERAGE=1 + cd scala-package + mvn install + cd .. ./contrib/clojure-package/integration-tests.sh } diff --git a/docker/Dockerfiles/Dockerfile.in.scala b/docker/Dockerfiles/Dockerfile.in.scala index 6898126c7cb2..92e098384e13 100644 --- a/docker/Dockerfiles/Dockerfile.in.scala +++ b/docker/Dockerfiles/Dockerfile.in.scala @@ -4,4 +4,4 @@ COPY install/scala.sh install/ RUN install/scala.sh -RUN cd mxnet && make scalapkg $BUILD_OPTS +RUN cd mxnet/scala-package && mvn package diff --git a/docs/install/java_setup.md b/docs/install/java_setup.md index ea4bb50329e8..c097051017a8 100644 --- a/docs/install/java_setup.md +++ b/docs/install/java_setup.md @@ -109,7 +109,7 @@ The previously mentioned setup with Maven is recommended. Otherwise, the followi If you have already built MXNet **from source** and are looking to setup Java from that point, you may simply run the following from the MXNet `scala-package` folder: ``` -mvn package +cd scala-package mvn install ``` This will install both the Java Inference API and the required MXNet-Scala package. diff --git a/docs/install/scala_setup.md b/docs/install/scala_setup.md index 98e752b21dd5..e81012991438 100644 --- a/docs/install/scala_setup.md +++ b/docs/install/scala_setup.md @@ -92,8 +92,8 @@ The previously mentioned setup with Maven is recommended. Otherwise, the followi If you have already built MXNet **from source** and are looking to setup Scala from that point, you may simply run the following from the MXNet source root: ``` -make scalapkg -make scalainstall +cd scala-package +mvn install ```
diff --git a/docs/mxdoc.py b/docs/mxdoc.py index fe3781ffe9cb..9f4982c42519 100644 --- a/docs/mxdoc.py +++ b/docs/mxdoc.py @@ -105,8 +105,7 @@ def build_r_docs(app): def build_scala(app): """build scala for scala docs, java docs, and clojure docs to use""" - _run_cmd("cd %s/.. && make scalapkg" % app.builder.srcdir) - _run_cmd("cd %s/.. && make scalainstall" % app.builder.srcdir) + _run_cmd("cd %s/.. && mvn install -DskipTests" % app.builder.srcdir) def build_scala_docs(app): """build scala doc and then move the outdir""" From a88a14747819992f2073565788c6e754d2b54475 Mon Sep 17 00:00:00 2001 From: Zach Kimberg Date: Mon, 28 Jan 2019 18:03:40 -0800 Subject: [PATCH 2/4] Unify making folders for scala/java setup --- docs/install/java_setup.md | 1 - docs/install/scala_setup.md | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/install/java_setup.md b/docs/install/java_setup.md index c097051017a8..bd20c9596013 100644 --- a/docs/install/java_setup.md +++ b/docs/install/java_setup.md @@ -109,7 +109,6 @@ The previously mentioned setup with Maven is recommended. Otherwise, the followi If you have already built MXNet **from source** and are looking to setup Java from that point, you may simply run the following from the MXNet `scala-package` folder: ``` -cd scala-package mvn install ``` This will install both the Java Inference API and the required MXNet-Scala package. diff --git a/docs/install/scala_setup.md b/docs/install/scala_setup.md index e81012991438..9ee9ceac3a3c 100644 --- a/docs/install/scala_setup.md +++ b/docs/install/scala_setup.md @@ -89,10 +89,9 @@ The previously mentioned setup with Maven is recommended. Otherwise, the followi #### Build Scala from an Existing MXNet Installation -If you have already built MXNet **from source** and are looking to setup Scala from that point, you may simply run the following from the MXNet source root: +If you have already built MXNet **from source** and are looking to setup Scala from that point, you may simply run the following from the MXNet `scala-package` folder: ``` -cd scala-package mvn install ``` From ff96dab762f0dfa0ac3d72e5cf0d207e938b366d Mon Sep 17 00:00:00 2001 From: Zach Kimberg Date: Tue, 29 Jan 2019 10:38:54 -0800 Subject: [PATCH 3/4] Fix mxdoc path --- docs/mxdoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mxdoc.py b/docs/mxdoc.py index 9f4982c42519..ec2a2e8fd1f8 100644 --- a/docs/mxdoc.py +++ b/docs/mxdoc.py @@ -105,7 +105,7 @@ def build_r_docs(app): def build_scala(app): """build scala for scala docs, java docs, and clojure docs to use""" - _run_cmd("cd %s/.. && mvn install -DskipTests" % app.builder.srcdir) + _run_cmd("cd %s/../scala-package && mvn install -DskipTests" % app.builder.srcdir) def build_scala_docs(app): """build scala doc and then move the outdir""" From 04a9a4a91e286ccb114246dfcb21d9584d57ebd6 Mon Sep 17 00:00:00 2001 From: Zach Kimberg Date: Tue, 29 Jan 2019 10:53:50 -0800 Subject: [PATCH 4/4] Add batch mode to calls --- ci/docker/runtime_functions.sh | 6 +++--- docs/mxdoc.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh index 6b5857b51e6a..f12745213cc4 100755 --- a/ci/docker/runtime_functions.sh +++ b/ci/docker/runtime_functions.sh @@ -871,7 +871,7 @@ unittest_ubuntu_cpu_clojure() { unittest_ubuntu_cpu_clojure_integration() { set -ex cd scala-package - mvn install + mvn -B install cd .. ./contrib/clojure-package/integration-tests.sh } @@ -1242,7 +1242,7 @@ nightly_tutorial_test_ubuntu_python2_gpu() { nightly_java_demo_test_cpu() { set -ex cd /work/mxnet/scala-package/mxnet-demo/java-demo - mvn -Pci-nightly install + mvn -B -Pci-nightly install bash bin/java_sample.sh bash bin/run_od.sh } @@ -1250,7 +1250,7 @@ nightly_java_demo_test_cpu() { nightly_scala_demo_test_cpu() { set -ex cd /work/mxnet/scala-package/mxnet-demo/scala-demo - mvn -Pci-nightly install + mvn -B -Pci-nightly install bash bin/demo.sh bash bin/run_im.sh } diff --git a/docs/mxdoc.py b/docs/mxdoc.py index ec2a2e8fd1f8..be5b8578e7e9 100644 --- a/docs/mxdoc.py +++ b/docs/mxdoc.py @@ -105,7 +105,7 @@ def build_r_docs(app): def build_scala(app): """build scala for scala docs, java docs, and clojure docs to use""" - _run_cmd("cd %s/../scala-package && mvn install -DskipTests" % app.builder.srcdir) + _run_cmd("cd %s/../scala-package && mvn -B install -DskipTests" % app.builder.srcdir) def build_scala_docs(app): """build scala doc and then move the outdir"""