From ac7c46b04193540e26e6ecd154052bb6b7756f88 Mon Sep 17 00:00:00 2001 From: gigasquid Date: Sat, 1 Dec 2018 18:11:42 -0500 Subject: [PATCH 1/3] Correct the versions so they correspond to the latest maven.org release --- contrib/clojure-package/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/contrib/clojure-package/README.md b/contrib/clojure-package/README.md index bc6100b86123..5e745695bdd6 100644 --- a/contrib/clojure-package/README.md +++ b/contrib/clojure-package/README.md @@ -105,9 +105,9 @@ brew install opencv - Create a new project with `lein new my-mxnet` - Edit your `project.clj` and add one of the following entries to `:dependencies`, based on your system and the compute device you want to use: - - `[org.apache.mxnet.contrib.clojure/clojure-mxnet-linux-cpu "1.4.0"]` - - `[org.apache.mxnet.contrib.clojure/clojure-mxnet-linux-gpu "1.4.0"]` - - `[org.apache.mxnet.contrib.clojure/clojure-mxnet-osx-cpu "1.4.0"]` + - `[org.apache.mxnet.contrib.clojure/clojure-mxnet-linux-cpu "1.3.1"]` + - `[org.apache.mxnet.contrib.clojure/clojure-mxnet-linux-gpu "1.3.1"]` + - `[org.apache.mxnet.contrib.clojure/clojure-mxnet-osx-cpu "1.3.1"]` After making this change and running `lein deps`, you should be able to run example code like this [NDArray Tutorial](https://github.com/apache/incubator-mxnet/blob/master/contrib/clojure-package/examples/tutorial/src/tutorial/ndarray.clj). @@ -116,20 +116,20 @@ After making this change and running `lein deps`, you should be able to run exam With this option, you will install a Git revision of the Clojure package source and a [Scala package jar from Maven](https://search.maven.org/search?q=g:org.apache.mxnet) with native dependencies baked in. - Install additional dependencies as described in [the corresponding section for Option 1](#installing-additional-dependencies), -- Recursively clone the MXNet repository and checkout the desired revision. Here we assume the `1.4.0` tag and a clone into the `~/mxnet` directory: +- Recursively clone the MXNet repository and checkout the desired revision. Here we assume the `1.3.1` tag and a clone into the `~/mxnet` directory: ```bash git clone --recursive https://github.com/apache/incubator-mxnet.git ~/mxnet cd ~/mxnet git tag --list # Find the tag that matches the Scala package version - git checkout tags/1.4.0 -b my_mxnet + git checkout tags/1.3.1 -b my_mxnet git submodule update --init --recursive cd contrib/clojure ``` - Edit `project.clj` to include the desired Scala jar from Maven: - [org.apache.mxnet/mxnet-full_2.11-linux-x86_64-cpu "1.4.0”] + [org.apache.mxnet/mxnet-full_2.11-linux-x86_64-cpu "1.3.1”] - Run `lein test`. All the tests should run without error. - At this point you can run `lein install` to build and install the Clojure jar locally. @@ -147,7 +147,7 @@ The first step is to recursively clone the MXNet repository and checkout the des ```bash git clone --recursive https://github.com/apache/incubator-mxnet.git ~/mxnet cd ~/mxnet - git checkout tags/1.4.0 -b my_mxnet # this is optional + git checkout tags/1.3.1 -b my_mxnet # this is optional git submodule update --init --recursive ``` From a4101ac0f25b8e5f1e94b9d89699a1ad5b217cca Mon Sep 17 00:00:00 2001 From: gigasquid Date: Sun, 2 Dec 2018 09:32:16 -0500 Subject: [PATCH 2/3] trigger build From 91682ff10135a7cee15a5f7c4e2996a652d5797f Mon Sep 17 00:00:00 2001 From: gigasquid Date: Tue, 11 Dec 2018 17:51:17 -0500 Subject: [PATCH 3/3] feedback from @kohr-h --- contrib/clojure-package/README.md | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/contrib/clojure-package/README.md b/contrib/clojure-package/README.md index dcffd8ba933d..7930befc61aa 100644 --- a/contrib/clojure-package/README.md +++ b/contrib/clojure-package/README.md @@ -106,11 +106,11 @@ brew install opencv - Edit your `project.clj` and add one of the following entries to `:dependencies`, based on your system and the compute device you want to use: - - `[org.apache.mxnet.contrib.clojure/clojure-mxnet-linux-cpu "latest-version"]` - - `[org.apache.mxnet.contrib.clojure/clojure-mxnet-linux-gpu "latest-version"]` - - `[org.apache.mxnet.contrib.clojure/clojure-mxnet-osx-cpu "latest-version]` + - `[org.apache.mxnet.contrib.clojure/clojure-mxnet-linux-cpu ]` + - `[org.apache.mxnet.contrib.clojure/clojure-mxnet-linux-gpu ]` + - `[org.apache.mxnet.contrib.clojure/clojure-mxnet-osx-cpu ]` -You can find the latest version out on [maven central](https://search.maven.org/search?q=clojure-mxnet) +You can find the latest version out on [maven central- clojure-mxnet latest](https://search.maven.org/search?q=clojure-mxnet) After making this change and running `lein deps`, you should be able to run example code like this [NDArray Tutorial](https://github.com/apache/incubator-mxnet/blob/master/contrib/clojure-package/examples/tutorial/src/tutorial/ndarray.clj). @@ -127,7 +127,7 @@ With this option, you will install a Git revision of the Clojure package source cd ~/mxnet git tag --list # Find the tag that matches the Scala package version - git checkout tags/version -b my_mxnet + git checkout tags/ -b my_mxnet git submodule update --init --recursive cd contrib/clojure ``` @@ -135,7 +135,7 @@ With this option, you will install a Git revision of the Clojure package source - Edit `project.clj` to include the desired Scala jar from Maven: - [org.apache.mxnet/mxnet-full_2.11-linux-x86_64-cpu "latest-version”] + [org.apache.mxnet/mxnet-full_2.11-linux-x86_64-cpu ] - Run `lein test`. All the tests should run without error. - At this point you can run `lein install` to build and install the Clojure jar locally. @@ -143,29 +143,20 @@ With this option, you will install a Git revision of the Clojure package source To run examples, you can now use `lein run` in any of the example directories, e.g., `examples/imclassification`. You can also specify the compute device, e.g., `lein run :cpu 2` (for 2 CPUs) or `lein run :gpu` (for 1 GPU). #### Experimental: Using Scala Snapshot Jars -**Note:** Instead of a release tag, you can also use a development version of the Clojure package, e.g., Git `master`, together with the prebuilt Scala jar. There is a snapshot repo available for the Scala jars on a nightly basis. You can use them in your project with adding a repository: +**Note:** Instead of a release tag, you can also use a development version of the Clojure package, e.g., Git `master`, together with the prebuilt Scala jar. There is a repo of nightly built snapshots of Scala jars. You can use them in your `project.clj` by adding a repository: ``` ["snapshots" {:url "https://repository.apache.org/content/repositories/snapshots" - ;; If a repository contains releases only setting - ;; :snapshots to false will speed up dependencies. :snapshots true - ;; Disable signing releases deployed to this repo. - ;; (Not recommended.) :sign-releases false - ;; You can also set the policies for how to handle - ;; :checksum failures to :fail, :warn, or :ignore. :checksum :fail - ;; How often should this repository be checked for - ;; snapshot updates? (:daily, :always, or :never) :update :always - ;; You can also apply them to releases only: :releases {:checksum :fail :update :always}}] ``` Then you should be able to run with your dependency: -`[org.apache.mxnet/mxnet-full_2.11-osx-x86_64-cpu "latest-version-SNAPSHOT"]` + [org.apache.mxnet/mxnet-full_2.11-osx-x86_64-cpu "latest-version-SNAPSHOT"] In that case, however, breakage can happen at any point, for instance when the Scala development version adds, changes or removes an interface and the Clojure development version moves along. If you really need the most recent version, you should consider [installation option 3](#option-3-everything-from-source).