Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
Synchronized the scala-demo and java-demo for nightly CI runs
Browse files Browse the repository at this point in the history
  • Loading branch information
piyushghai committed Jan 10, 2019
1 parent d124168 commit 39cb91e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ci/docker/runtime_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ nightly_tutorial_test_ubuntu_python2_gpu() {
nightly_java_demo_test_cpu() {
set -ex
cd /work/mxnet/scala-package/mxnet-demo/java-demo
make javademo
make java_ci_demo
./bin/java_sample.sh
./bin/run_od.sh
}
Expand Down
11 changes: 6 additions & 5 deletions scala-package/mxnet-demo/java-demo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
# under the License.

SCALA_VERSION_PROFILE := 2.11
MXNET_VERSION := [1.5.0-SNAPSHOT,\)

ifeq ($(OS),Windows_NT)
UNAME_S := Windows
Expand All @@ -42,10 +41,12 @@ endif

javademo:
(mvn install dependency:copy-dependencies package -Dmxnet.profile=$(SCALA_PKG_PROFILE) \
-Dmxnet.scalaprofile=$(SCALA_VERSION_PROFILE) \
-Dmxnet.version=$(MXNET_VERSION))
-Dmxnet.scalaprofile=$(SCALA_VERSION_PROFILE))

java_ci_demo:
(mvn -Pci-nightly install dependency:copy-dependencies package -Dmxnet.profile=$(SCALA_PKG_PROFILE) \
-Dmxnet.scalaprofile=$(SCALA_VERSION_PROFILE))

javaclean:
(mvn clean -Dmxnet.profile=$(SCALA_PKG_PROFILE) \
-Dmxnet.scalaprofile=$(SCALA_VERSION_PROFILE) \
-Dmxnet.version=$(MXNET_VERSION))
-Dmxnet.scalaprofile=$(SCALA_VERSION_PROFILE))
7 changes: 3 additions & 4 deletions scala-package/mxnet-demo/java-demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,12 @@ You can use the following instruction as an alternative to achieve the same resu
User are required to use `mvn package` to build the package,
which are shown below:
```Bash
export SCALA_VERSION_PROFILE=2.11 MXNET_VERSION=1.5.0-SNAPSHOT
export SCALA_VERSION_PROFILE=2.11
export SCALA_PKG_PROFILE=
mvn package -Dmxnet.profile=$SCALA_PKG_PROFILE \
-Dmxnet.scalaprofile=$SCALA_VERSION_PROFILE \
-Dmxnet.version=$MXNET_VERSION
-Dmxnet.scalaprofile=$SCALA_VERSION_PROFILE
```
These environment variable (`SCALA_PKG_PROFILE`, `SCALA_VERSION_PROFILE`, `MXNET_VERSION`)
These environment variable (`SCALA_PKG_PROFILE`, `SCALA_VERSION_PROFILE`)
should be set before executing the line above.
The `SCALA_PKG_PROFILE` should be chosen from `osx-x86_64-cpu`, `linux-x86_64-cpu` or `linux-x86_64-gpu`.

Expand Down
16 changes: 16 additions & 0 deletions scala-package/mxnet-demo/java-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,21 @@
<version>1.0-SNAPSHOT</version>
<name>MXNet Java Demo</name>

<profiles>
<profile>
<id>ci-nightly</id>
<repositories>
<repository>
<id>Apache Snapshot</id>
<url>https://repository.apache.org/content/groups/snapshots</url>
</repository>
</repositories>
<properties>
<mxnet.version>[1.5.0-SNAPSHOT, )</mxnet.version>
</properties>
</profile>
</profiles>

<repositories>
<repository>
<id>Apache Snapshot</id>
Expand All @@ -18,6 +33,7 @@
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<mxnet.version>[1.5.0-SNAPSHOT, )</mxnet.version>
</properties>

<dependencies>
Expand Down

0 comments on commit 39cb91e

Please sign in to comment.