Skip to content

Commit

Permalink
Update project.clj file to use the snapshots repo to be able to pull (a…
Browse files Browse the repository at this point in the history
…pache#13935)

nightly Scala jar - also update readme
  • Loading branch information
gigasquid authored and haohuw committed Jun 23, 2019
1 parent 44da702 commit fd15dc7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 30 deletions.
14 changes: 3 additions & 11 deletions contrib/clojure-package/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,21 +142,13 @@ 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 repo of nightly built snapshots of Scala jars. You can use them in your `project.clj` by adding a repository:
#### Using Scala Nightly 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 repo of nightly built snapshots of Scala jars. You can use them in your `project.clj` by adding them as a dependency:

```
["snapshots" {:url "https://repository.apache.org/content/repositories/snapshots"
:snapshots true
:sign-releases false
:checksum :fail
:update :always
: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 "<insert-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).
Expand Down
27 changes: 8 additions & 19 deletions contrib/clojure-package/project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@
:dependencies [[org.clojure/clojure "1.9.0"]
[t6/from-scala "0.3.0"]

;; Jars from Nexus
;[org.apache.mxnet/mxnet-full_2.11-osx-x86_64-cpu "1.2.1"]
;[org.apache.mxnet/mxnet-full_2.11-linux-x86_64-cpu "1.2.1"]
;[org.apache.mxnet/mxnet-full_2.11-linux-x86_64-gpu "1.2.1"]
;; To use with nightly snapshot
;[org.apache.mxnet/mxnet-full_2.11-osx-x86_64-cpu "<insert-snapshot-version>"]
;[org.apache.mxnet/mxnet-full_2.11-linux-x86_64-cpu "<insert-snapshot-version>"]
;[org.apache.mxnet/mxnet-full_2.11-linux-x86_64-gpu "<insert-snapshot-version"]

;;; CI
[org.apache.mxnet/mxnet-full_2.11 "INTERNAL"]
Expand All @@ -41,18 +41,7 @@
[lein-cljfmt "0.5.7"]]
:codox {:namespaces [#"^org\.apache\.clojure-mxnet\.(?!gen).*"]}
:aot [dev.generator]
:repositories [["staging" {:url "https://repository.apache.org/content/repositories/staging"
;; 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}}]])
:repositories [["staging" {:url "https://repository.apache.org/content/repositories/staging" :snapshots true
:update :always}]
["snapshots" {:url "https://repository.apache.org/content/repositories/snapshots" :snapshots true
:update :always}]])

0 comments on commit fd15dc7

Please sign in to comment.