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/08 18:47:03 UTC

[GitHub] piyushghai commented on a change in pull request #13183: [MXNET-1187] Added Tutorial for Java under mxnet.io/docs/tutorials

piyushghai commented on a change in pull request #13183: [MXNET-1187] Added Tutorial for Java under mxnet.io/docs/tutorials
URL: https://github.com/apache/incubator-mxnet/pull/13183#discussion_r232016611
 
 

 ##########
 File path: docs/tutorials/java/mxnet_java_on_intellij.md
 ##########
 @@ -0,0 +1,210 @@
+# Run MXNet Java Examples Using the IntelliJ IDE (macOS)
+
+This tutorial guides you through setting up a simple Java project in IntelliJ IDE on macOS and demonstrates usage of the MXNet Java APIs. 
+
+## Prerequisites:
+To use this tutorial you need the following pre-requisites:
+
+- [Java 8 JDK](http://www.oracle.com/technetwork/java/javase/downloads/index.html)
+- [Maven](https://maven.apache.org/install.html)
+- [OpenCV](https://opencv.org/)
+- [IntelliJ IDE](https://www.jetbrains.com/idea/)
+
+### MacOS Prerequisites
+
+**Step 1.** Install brew:
+```
+/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
+```
+
+Or, if you already have brew, update it:
+```
+brew update
+```
+
+**Step 2.** Install Java 8:
+```
+brew tap caskroom/versions
+brew cask install java8
+```
+
+**Step 3.** Install maven:
+```
+brew install maven
+```
+
+**Step 4.** Install OpenCV:
+```
+brew install opencv
+```
+
+You can also run this tutorial on an Ubuntu machine after installing the following prerequisites.
+### Ubuntu Prerequisites
+
+**Step 1.** Download the MXNet source.
+
+```bash
+git clone --recursive https://github.com/apache/incubator-mxnet.git mxnet
+cd mxnet
+```
+
+**Step 2.** Run the dependency installation scripts.
+
+```bash
+sudo ./ci/docker/install/ubuntu_core.sh
+sudo ./ci/docker/install/ubuntu_scala.sh
+```
+
+The `ubuntu_scala.sh` installs the common dependencies required for both MXNet Scala and MXNet Java packages.
+
+## Set Up Your Project
+
+**Step 1.** Install and setup [IntelliJ IDEA](https://www.jetbrains.com/idea/)
+
+**Step 2.** Create a new Project:
+
+![intellij welcome](https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/scala/intellij-welcome.png)
+
+From the IntelliJ welcome screen, select "Create New Project".
+
+Choose the Maven project type. 
+
+Select the checkbox for `Create from archetype`, then choose `org.apache.maven.archetypes:maven-archetype-quickstart` from the list below. More on this can be found on a Maven tutorial : [Maven in 5 Minutes](https://maven.apache.org/guides/getting-started/maven-in-five-minutes.html). 
+
+![maven project type - archetype](https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/java/project-archetype.png)
+
+click `Next`.
+
+![project metadata](https://raw.githubusercontent.com/dmlc/web-data/master/mxnet/java/intellij-project-metadata.png)
+
+Set the project's metadata. For this tutorial, use the following:
+
+**GroupId**
 
 Review comment:
   This is a sample project to showcase how to integrate MXNet into an existing/new java project. It's independent of the existing scala/java package in the codebase. 
   Hence I kept the groupId and artifact Id as placeholder or random example names. 

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