You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/11/01 01:40:35 UTC

[GitHub] gigasquid commented on a change in pull request #12881: Improve the Clojure Package README to Make it Easier to Get Started

gigasquid commented on a change in pull request #12881: Improve the Clojure Package README to Make it Easier to Get Started
URL: https://github.com/apache/incubator-mxnet/pull/12881#discussion_r229917533
 
 

 ##########
 File path: contrib/clojure-package/README.md
 ##########
 @@ -80,75 +83,66 @@ wget https://archive.archlinux.org/packages/c/cuda/cuda-9.0.176-4-x86_64.pkg.tar
 sudo pacman -U cuda-9.0.176-4-x86_64.pkg.tar.xz
 ```
 
-If you want to see the exact versions and flags that the jars were built with, look here:
-[Scala Release Process](https://cwiki.apache.org/confluence/display/MXNET/MXNet-Scala+Release+Process)
-
-
-Check your installation with `lein test`. If that works alright then, you can try some code!
-
-```clojure
-
-(ns tutorial.ndarray
-  (:require [org.apache.clojure-mxnet.ndarray :as ndarray]
-            [org.apache.clojure-mxnet.context :as context]))
-
-;;Create NDArray
-(def a (ndarray/zeros [100 50])) ;;all zero arrray of dimension 100 x 50
-(def b (ndarray/ones [256 32 128 1])) ;; all one array of dimension
-(def c (ndarray/array [1 2 3 4 5 6] [2 3])) ;; array with contents of a shape 2 x 3
-
-;;; There are also ways to convert to a vec or get the shape as an object or vec
-(ndarray/->vec c) ;=> [1.0 2.0 3.0 4.0 5.0 6.0]
-```
-
-See the examples/tutorial section for more.
+At this point you should be able to run your own example like this [NDArray Tutorial](https://github.com/apache/incubator-mxnet/blob/master/contrib/clojure-package/examples/tutorial/src/tutorial/ndarray.clj)
 
+### Getting Started with MXNet project with the Prebuilt Scala Jars
 
-The jars from maven with the needed MXNet native binaries in it. On startup, the native libraries are extracted from the jar and copied into a temporary location on your path. On termination, they are deleted.
+This option is also fast. It doesn't require you to build the native C library or the Scala jars, it gets them from [Maven](https://search.maven.org/search?q=g:org.apache.mxnet) as well. Use this if you want to clone the repo and be able to run the tests and examples in the Clojure package.
 
+- `git clone --recursive https://github.com/apache/incubator-mxnet.git ~/mxnet`
+- `cd mxnet`
+- `git tag —list` (find the tag that corresponds the version of the latest Scala jar)
+- `git checkout tags/<tag_name> -b <branch_name>`
+- `cd contrib/clojure`
+- edit `project.clj` to include your Scala jar from maven. It should match your system. Example `[org.apache.mxnet/mxnet-full_2.11-linux-x86_64-cpu "x.y.z”]`
+- run `lein test`. All the tests should run without an error
 
 Review comment:
   There is a need help section now in the doc that can point them where to go

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services