The Clojure package depends on the Scala package jars. During the release process, new Scala jars are pushed to the staging repository for testing. This guide covers the manual steps that are taken to verify that they work.
There are currently 3 architectures supported, OSX cpu, LInux cpu, and Linux gpu. You will need to perform the following actions on each architecture.
- Load any OS/Architecture dependencies (see MXNet-Scala Release Process for build details per architecture)
- For Ubuntu you will need
- For Deep Learning AMI Ubuntu p2.xlarge you will need only Leningen
wget https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein chmod 755 lein mv lein /usr/local/bin/.
git clone https://github.com/apache/incubator-mxnet.git
note do not need recursive
cd incubator-mxnet
- Find tag with
git checkout tags/<tag_name> -b <branch_name>
cd contrib/clojure
- vi project.clj
- Edit the scala mxnet dependency for the correct version and architecture. Ex:
[org.apache.mxnet/mxnet-full_2.11-linux-x86_64-gpu "1.3.0”]
- Edit the scala mxnet dependency for the correct version and architecture. Ex:
lein test
This will download the scala jar from staging and run the clojure test suite. There should be no errors.
- lein install
This will create the Clojure jar and install it in the local maven repo
- cd examples/imclassification
- Run the example for the correct build
lein run :cpu
will run on 1 cpu
lein run :cpu 2
will run on 2 cpus
lein run :gpu
will run on 1 gpu
lein run :gpu 2
will run on 2 gpus