|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 3 | + ~ Copyright (c) 2015-2019 Skymind, Inc. |
| 4 | + ~ |
| 5 | + ~ This program and the accompanying materials are made available under the |
| 6 | + ~ terms of the Apache License, Version 2.0 which is available at |
| 7 | + ~ https://www.apache.org/licenses/LICENSE-2.0. |
| 8 | + ~ |
| 9 | + ~ Unless required by applicable law or agreed to in writing, software |
| 10 | + ~ distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 11 | + ~ WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 12 | + ~ License for the specific language governing permissions and limitations |
| 13 | + ~ under the License. |
| 14 | + ~ |
| 15 | + ~ SPDX-License-Identifier: Apache-2.0 |
| 16 | + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~--> |
| 17 | + |
| 18 | +<project xmlns="http://maven.apache.org/POM/4.0.0" |
| 19 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 20 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 21 | + <modelVersion>4.0.0</modelVersion> |
| 22 | + |
| 23 | + <!-- Group-ID, artifact ID and version of the project. You can modify these as you want --> |
| 24 | + <groupId>org.deeplearning4j</groupId> |
| 25 | + <artifactId>deeplearning4j-examples</artifactId> |
| 26 | + <version>1.0.0-beta5</version> |
| 27 | + |
| 28 | + <!-- Properties Section. Change DL4J and ND4J versions here, if required --> |
| 29 | + <properties> |
| 30 | + <dl4j.version>1.0.0-beta5</dl4j.version> |
| 31 | + <nd4j.version>1.0.0-beta5</nd4j.version> |
| 32 | + <logback.version>1.2.3</logback.version> |
| 33 | + <java.version>1.8</java.version> |
| 34 | + <maven-shade-plugin.version>2.4.3</maven-shade-plugin.version> |
| 35 | + </properties> |
| 36 | + |
| 37 | + |
| 38 | + <dependencies> |
| 39 | + <!-- deeplearning4j-core: contains main functionality and neural networks --> |
| 40 | + <dependency> |
| 41 | + <groupId>org.deeplearning4j</groupId> |
| 42 | + <artifactId>deeplearning4j-core</artifactId> |
| 43 | + <version>${dl4j.version}</version> |
| 44 | + </dependency> |
| 45 | + |
| 46 | + <!-- |
| 47 | + ND4J backend: every project needs one of these. The backend defines the hardware on which network training |
| 48 | + will occur. "nd4j-native-platform" is for CPUs only (for running on all operating systems). |
| 49 | + --> |
| 50 | + <dependency> |
| 51 | + <groupId>org.nd4j</groupId> |
| 52 | + <artifactId>nd4j-native</artifactId> |
| 53 | + <version>${nd4j.version}</version> |
| 54 | + </dependency> |
| 55 | + |
| 56 | + <!-- CUDA: to use GPU for training (CUDA) instead of CPU, uncomment this, and remove nd4j-native-platform --> |
| 57 | + <!-- Requires CUDA to be installed to use. Change the version (9.2, 10.0, 10.1) to change the CUDA version --> |
| 58 | + <!-- |
| 59 | + <dependency> |
| 60 | + <groupId>org.nd4j</groupId> |
| 61 | + <artifactId>nd4j-cuda-10.1-platform</artifactId> |
| 62 | + <version>${nd4j.version}</version> |
| 63 | + </dependency> |
| 64 | + --> |
| 65 | + |
| 66 | + <!-- Optional, but recommended: if you use CUDA, also use CuDNN. To use this, CuDNN must also be installed --> |
| 67 | + <!-- See: https://deeplearning4j.org/cudnn --> |
| 68 | + <!-- |
| 69 | + <dependency> |
| 70 | + <groupId>org.deeplearning4j</groupId> |
| 71 | + <artifactId>deeplearning4j-cuda-10.1</artifactId> |
| 72 | + <version>${dl4j.version}</version> |
| 73 | + </dependency> |
| 74 | + --> |
| 75 | + |
| 76 | + <dependency> |
| 77 | + <groupId>org.deeplearning4j</groupId> |
| 78 | + <artifactId>deeplearning4j-ui_2.11</artifactId> |
| 79 | + <version>${dl4j.version}</version> |
| 80 | + </dependency> |
| 81 | + |
| 82 | + <dependency> |
| 83 | + <groupId>ch.qos.logback</groupId> |
| 84 | + <artifactId>logback-classic</artifactId> |
| 85 | + <version>${logback.version}</version> |
| 86 | + </dependency> |
| 87 | + |
| 88 | + <!-- Used for downloading data in some of the examples --> |
| 89 | + <dependency> |
| 90 | + <groupId>org.apache.httpcomponents</groupId> |
| 91 | + <artifactId>httpclient</artifactId> |
| 92 | + <version>4.3.5</version> |
| 93 | + </dependency> |
| 94 | + </dependencies> |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | + <build> |
| 99 | + <plugins> |
| 100 | + <!-- Maven compiler plugin: compile for Java 8 --> |
| 101 | + <plugin> |
| 102 | + <groupId>org.apache.maven.plugins</groupId> |
| 103 | + <artifactId>maven-compiler-plugin</artifactId> |
| 104 | + <version>3.5.1</version> |
| 105 | + <configuration> |
| 106 | + <source>${java.version}</source> |
| 107 | + <target>${java.version}</target> |
| 108 | + </configuration> |
| 109 | + </plugin> |
| 110 | + |
| 111 | + |
| 112 | + <!-- |
| 113 | + Maven shade plugin configuration: this is required so that if you build a single JAR file (an "uber-jar") |
| 114 | + it will contain all the required native libraries, and the backends will work correctly. |
| 115 | + Used for example when running the following commants |
| 116 | +
|
| 117 | + mvn package |
| 118 | + cd target |
| 119 | + java -cp deeplearning4j-examples-1.0.0-beta-bin.jar org.deeplearning4j.LenetMnistExample |
| 120 | + --> |
| 121 | + <plugin> |
| 122 | + <groupId>org.apache.maven.plugins</groupId> |
| 123 | + <artifactId>maven-shade-plugin</artifactId> |
| 124 | + <version>${maven-shade-plugin.version}</version> |
| 125 | + <configuration> |
| 126 | + <shadedArtifactAttached>true</shadedArtifactAttached> |
| 127 | + <shadedClassifierName>bin</shadedClassifierName> |
| 128 | + <createDependencyReducedPom>true</createDependencyReducedPom> |
| 129 | + <filters> |
| 130 | + <filter> |
| 131 | + <artifact>*:*</artifact> |
| 132 | + <excludes> |
| 133 | + <exclude>org/datanucleus/**</exclude> |
| 134 | + <exclude>META-INF/*.SF</exclude> |
| 135 | + <exclude>META-INF/*.DSA</exclude> |
| 136 | + <exclude>META-INF/*.RSA</exclude> |
| 137 | + </excludes> |
| 138 | + </filter> |
| 139 | + </filters> |
| 140 | + </configuration> |
| 141 | + |
| 142 | + <executions> |
| 143 | + <execution> |
| 144 | + <phase>package</phase> |
| 145 | + <goals> |
| 146 | + <goal>shade</goal> |
| 147 | + </goals> |
| 148 | + <configuration> |
| 149 | + <transformers> |
| 150 | + <transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer"> |
| 151 | + <resource>reference.conf</resource> |
| 152 | + </transformer> |
| 153 | + <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> |
| 154 | + <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer"> |
| 155 | + </transformer> |
| 156 | + </transformers> |
| 157 | + </configuration> |
| 158 | + </execution> |
| 159 | + </executions> |
| 160 | + </plugin> |
| 161 | + </plugins> |
| 162 | + </build> |
| 163 | + |
| 164 | +</project> |
0 commit comments