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

[MXNET-1177]Adding Scala Demo to be run as a part of Nightly CI #13823

Merged
merged 6 commits into from
Jan 14, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions ci/docker/runtime_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1229,11 +1229,18 @@ nightly_tutorial_test_ubuntu_python2_gpu() {
nightly_java_demo_test_cpu() {
set -ex
cd /work/mxnet/scala-package/mxnet-demo/java-demo
make javademo
./bin/java_sample.sh
./bin/run_od.sh
make java_ci_demo
bash bin/java_sample.sh
bash bin/run_od.sh
}

nightly_scala_demo_test_cpu() {
set -ex
cd /work/mxnet/scala-package/mxnet-demo/scala-demo
make scala_ci_demo
bash bin/demo.sh
piyushghai marked this conversation as resolved.
Show resolved Hide resolved
bash bin/run_im.sh
}

# Deploy

Expand Down
13 changes: 7 additions & 6 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 @@ -41,11 +40,13 @@ else
endif

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

java_ci_demo:
(mvn -Pci-nightly install -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
35 changes: 35 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 All @@ -33,4 +49,23 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.9</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>
8 changes: 5 additions & 3 deletions scala-package/mxnet-demo/scala-demo/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

SCALA_VERSION_PROFILE := 2.11
SCALA_VERSION := 2.11.8
MXNET_VERSION := 1.3.0
piyushghai marked this conversation as resolved.
Show resolved Hide resolved

ifeq ($(OS),Windows_NT)
UNAME_S := Windows
Expand All @@ -44,11 +43,14 @@ endif
scalademo:
(mvn package -Dmxnet.profile=$(SCALA_PKG_PROFILE) \
-Dmxnet.scalaprofile=$(SCALA_VERSION_PROFILE) \
-Dmxnet.version=$(MXNET_VERSION) \
-Dscala.version=$(SCALA_VERSION))

scala_ci_demo:
(mvn -Pci-nightly package -Dmxnet.profile=$(SCALA_PKG_PROFILE) \
-Dmxnet.scalaprofile=$(SCALA_VERSION_PROFILE) \
-Dscala.version=$(SCALA_VERSION))

scalaclean:
(mvn clean -Dmxnet.profile=$(SCALA_PKG_PROFILE) \
-Dmxnet.scalaprofile=$(SCALA_VERSION_PROFILE) \
-Dmxnet.version=$(MXNET_VERSION) \
-Dscala.version=$(SCALA_VERSION))
5 changes: 2 additions & 3 deletions scala-package/mxnet-demo/scala-demo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ This is an project created to use Maven-published Scala package with two Scala e
User are required to use `mvn package` to build the package,
which are shown below:
```Bash
export SCALA_VERSION_PROFILE=2.11 SCALA_VERSION=2.11.8 MXNET_VERSION=1.3.0
export SCALA_VERSION_PROFILE=2.11 SCALA_VERSION=2.11.8
export SCALA_PKG_PROFILE=
mvn package -Dmxnet.profile=$(SCALA_PKG_PROFILE) \
-Dmxnet.scalaprofile=$(SCALA_VERSION_PROFILE) \
-Dmxnet.version=$(MXNET_VERSION) \
-Dscala.version=$(SCALA_VERSION)
```
These environment variable (`SCALA_PKG_PROFILE`, `SCALA_VERSION_PROFILE`, `MXNET_VERSION`, `SCALA_VERSION`)
These environment variable (`SCALA_PKG_PROFILE`, `SCALA_VERSION_PROFILE`, `SCALA_VERSION`)
should be set before executing the line above.

To obtain the most recent MXNet version, please click [here](https://mvnrepository.com/search?q=org.apache.mxnet)
Expand Down
19 changes: 19 additions & 0 deletions scala-package/mxnet-demo/scala-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,25 @@
<name>MXNet Scala Demo</name>
<packaging>pom</packaging>

<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>

<properties>
<mxnet.version>[1.3.1, )</mxnet.version>
</properties>

<dependencies>
<dependency>
<groupId>org.apache.mxnet</groupId>
Expand Down
8 changes: 8 additions & 0 deletions tests/nightly/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,14 @@ core_logic: {
}
}
},
'Scala Demo: CPU': {
node(NODE_LINUX_CPU) {
ws('workspace/scala-demo') {
utils.init_git()
utils.docker_run('ubuntu_nightly_cpu', 'nightly_scala_demo_test_cpu', false)
}
}
},
'MXNetJS: CPU': {
node(NODE_LINUX_CPU) {
ws('workspace/nt-mxnetjs') {
Expand Down