diff --git a/.jenkins/linux-x86_64-docker-cpu-publish.jenkinsfile b/.jenkins/linux-x86_64-docker-cpu-publish.jenkinsfile new file mode 100644 index 000000000..d185b5946 --- /dev/null +++ b/.jenkins/linux-x86_64-docker-cpu-publish.jenkinsfile @@ -0,0 +1,49 @@ +/* + * + * ****************************************************************************** + * * + * * This program and the accompanying materials are made available under the + * * terms of the Apache License, Version 2.0 which is available at + * * https://www.apache.org/licenses/LICENSE-2.0. + * * + * * See the NOTICE file distributed with this work for additional + * * information regarding copyright ownership. + * * Unless required by applicable law or agreed to in writing, software + * * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * * License for the specific language governing permissions and limitations + * * under the License. + * * + * * SPDX-License-Identifier: Apache-2.0 + * ***************************************************************************** + * + */ + +pipeline { + agent { + dockerfile { + filename 'Dockerfile' + dir '.docker' + label 'linux && docker' + //additionalBuildArgs '--build-arg version=1.0.2' + //args '--gpus all' + } + } + + stages { + stage('publish-linux-cpu') { + environment { + MAVEN = credentials('Internal Archiva') + OSSRH = credentials('OSSRH') + } + + steps { + withGradle { + sh 'sh ./gradlew publish -x test -PCAVIS_CHIP=cpu \ + -Pmavenuser=$MAVEN_USR -Pmavenpass=$MAVEN_PSW \ + -PossrhUsername=$OSSRH_USR -PossrhPassword=$OSSRH_PSW' + } + } + } + } +} diff --git a/cavis-dnn/cavis-dnn-nn-parent/cavis-dnn-nn-core/src/test/java/org/deeplearning4j/clustering/kdtree/KDTreeTest.java b/cavis-dnn/cavis-dnn-nn-parent/cavis-dnn-nn-core/src/test/java/org/deeplearning4j/clustering/kdtree/KDTreeTest.java index cb6b05d89..00beb9e71 100644 --- a/cavis-dnn/cavis-dnn-nn-parent/cavis-dnn-nn-core/src/test/java/org/deeplearning4j/clustering/kdtree/KDTreeTest.java +++ b/cavis-dnn/cavis-dnn-nn-parent/cavis-dnn-nn-core/src/test/java/org/deeplearning4j/clustering/kdtree/KDTreeTest.java @@ -19,10 +19,7 @@ package org.deeplearning4j.clustering.kdtree; import lombok.val; import org.deeplearning4j.BaseDL4JTest; import org.joda.time.Duration; -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Tag; -import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.*; import org.nd4j.linalg.api.buffer.DataType; import org.nd4j.linalg.api.ndarray.INDArray; import org.nd4j.linalg.factory.Nd4j; @@ -44,12 +41,9 @@ import static org.junit.jupiter.api.Assertions.assertTrue; /** * Created by agibsonccc on 1/1/15. */ +@Timeout(120) public class KDTreeTest extends BaseDL4JTest { - @Override - public long getTimeoutMilliseconds() { - return 120000L; - } private KDTree kdTree; diff --git a/cavis-dnn/cavis-dnn-nn-parent/cavis-dnn-nn-core/src/test/java/org/deeplearning4j/clustering/kmeans/KMeansTest.java b/cavis-dnn/cavis-dnn-nn-parent/cavis-dnn-nn-core/src/test/java/org/deeplearning4j/clustering/kmeans/KMeansTest.java index 4b35b9f6a..40683daa9 100644 --- a/cavis-dnn/cavis-dnn-nn-parent/cavis-dnn-nn-core/src/test/java/org/deeplearning4j/clustering/kmeans/KMeansTest.java +++ b/cavis-dnn/cavis-dnn-nn-parent/cavis-dnn-nn-core/src/test/java/org/deeplearning4j/clustering/kmeans/KMeansTest.java @@ -22,6 +22,7 @@ import org.deeplearning4j.Performance; import org.deeplearning4j.clustering.algorithm.Distance; import org.deeplearning4j.clustering.cluster.*; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Timeout; import org.nd4j.linalg.api.buffer.DataType; import org.nd4j.linalg.api.ndarray.INDArray; import org.nd4j.linalg.factory.Nd4j; @@ -34,15 +35,11 @@ import static org.junit.jupiter.api.Assertions.assertEquals; /** * Created by agibsonccc on 7/2/17. */ +@Timeout(120) public class KMeansTest extends BaseDL4JTest { private boolean[] useKMeansPlusPlus = {true, false}; - @Override - public long getTimeoutMilliseconds() { - return 60000L; - } - @Test public void testKMeans() { Nd4j.getRandom().setSeed(7); diff --git a/cavis-dnn/cavis-dnn-nn-parent/cavis-dnn-nn-core/src/test/java/org/deeplearning4j/clustering/sptree/SPTreeTest.java b/cavis-dnn/cavis-dnn-nn-parent/cavis-dnn-nn-core/src/test/java/org/deeplearning4j/clustering/sptree/SPTreeTest.java index 17af2afd4..5973a1f5a 100644 --- a/cavis-dnn/cavis-dnn-nn-parent/cavis-dnn-nn-core/src/test/java/org/deeplearning4j/clustering/sptree/SPTreeTest.java +++ b/cavis-dnn/cavis-dnn-nn-parent/cavis-dnn-nn-core/src/test/java/org/deeplearning4j/clustering/sptree/SPTreeTest.java @@ -33,11 +33,6 @@ import static org.junit.jupiter.api.Assertions.*; */ public class SPTreeTest extends BaseDL4JTest { - @Override - public long getTimeoutMilliseconds() { - return 120000L; - } - @BeforeEach public void setUp() { DataTypeUtil.setDTypeForContext(DataType.DOUBLE); diff --git a/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-core/src/test/java/org/deeplearning4j/spark/BaseSparkKryoTest.java b/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-core/src/test/java/org/deeplearning4j/spark/BaseSparkKryoTest.java index 9cab73c5e..e60185e46 100644 --- a/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-core/src/test/java/org/deeplearning4j/spark/BaseSparkKryoTest.java +++ b/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-core/src/test/java/org/deeplearning4j/spark/BaseSparkKryoTest.java @@ -29,11 +29,6 @@ import java.util.Map; public class BaseSparkKryoTest extends BaseSparkTest { - @Override - public long getTimeoutMilliseconds() { - return 120000L; - } - @Override public JavaSparkContext getContext() { if (sc != null) { diff --git a/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-core/src/test/java/org/deeplearning4j/spark/BaseSparkTest.java b/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-core/src/test/java/org/deeplearning4j/spark/BaseSparkTest.java index e00f8d6d3..5a8ac5d7e 100644 --- a/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-core/src/test/java/org/deeplearning4j/spark/BaseSparkTest.java +++ b/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-core/src/test/java/org/deeplearning4j/spark/BaseSparkTest.java @@ -56,11 +56,6 @@ public abstract class BaseSparkTest extends BaseDL4JTest implements Serializable protected transient DataSet data; protected transient JavaRDD sparkData; - @Override - public long getTimeoutMilliseconds() { - return 120000L; - } - @BeforeEach public void before() { diff --git a/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-core/src/test/java/org/deeplearning4j/spark/impl/multilayer/TestSparkDl4jMultiLayer.java b/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-core/src/test/java/org/deeplearning4j/spark/impl/multilayer/TestSparkDl4jMultiLayer.java index c64618557..9c7f783e0 100644 --- a/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-core/src/test/java/org/deeplearning4j/spark/impl/multilayer/TestSparkDl4jMultiLayer.java +++ b/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-core/src/test/java/org/deeplearning4j/spark/impl/multilayer/TestSparkDl4jMultiLayer.java @@ -53,11 +53,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue; @Slf4j public class TestSparkDl4jMultiLayer extends BaseSparkTest { - @Override - public long getTimeoutMilliseconds() { - return 120000L; - } - @Override public DataType getDataType() { return DataType.FLOAT; diff --git a/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-core/src/test/java/org/deeplearning4j/spark/impl/paramavg/TestSparkMultiLayerParameterAveraging.java b/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-core/src/test/java/org/deeplearning4j/spark/impl/paramavg/TestSparkMultiLayerParameterAveraging.java index bc1ced484..48a30034a 100644 --- a/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-core/src/test/java/org/deeplearning4j/spark/impl/paramavg/TestSparkMultiLayerParameterAveraging.java +++ b/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-core/src/test/java/org/deeplearning4j/spark/impl/paramavg/TestSparkMultiLayerParameterAveraging.java @@ -98,12 +98,6 @@ public class TestSparkMultiLayerParameterAveraging extends BaseSparkTest { @TempDir public File testDir; - - @Override - public long getTimeoutMilliseconds() { - return 120000L; - } - @Override public DataType getDefaultFPDataType() { return DataType.FLOAT; diff --git a/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-core/src/test/java/org/deeplearning4j/spark/util/TestRepartitioning.java b/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-core/src/test/java/org/deeplearning4j/spark/util/TestRepartitioning.java index c83282547..77fdff58e 100644 --- a/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-core/src/test/java/org/deeplearning4j/spark/util/TestRepartitioning.java +++ b/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-core/src/test/java/org/deeplearning4j/spark/util/TestRepartitioning.java @@ -31,6 +31,7 @@ import org.deeplearning4j.spark.impl.common.CountPartitionsFunction; import org.deeplearning4j.spark.impl.repartitioner.DefaultRepartitioner; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Timeout; import scala.Tuple2; import java.util.ArrayList; @@ -42,13 +43,9 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; +@Timeout(300) public class TestRepartitioning extends BaseSparkTest { - @Override - public long getTimeoutMilliseconds() { - return isIntegrationTests() ? 240000 : 60000; - } - @Test public void testRepartitioning() { if(Platform.isWindows()) { diff --git a/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-nlp/src/test/java/org/deeplearning4j/spark/text/BaseSparkTest.java b/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-nlp/src/test/java/org/deeplearning4j/spark/text/BaseSparkTest.java index d998ddde4..1e647013a 100644 --- a/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-nlp/src/test/java/org/deeplearning4j/spark/text/BaseSparkTest.java +++ b/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-nlp/src/test/java/org/deeplearning4j/spark/text/BaseSparkTest.java @@ -35,11 +35,6 @@ import java.util.Map; public abstract class BaseSparkTest extends BaseDL4JTest implements Serializable { protected transient JavaSparkContext sc; - @Override - public long getTimeoutMilliseconds() { - return 120000L; - } - @BeforeEach public void before() throws Exception { sc = getContext(); diff --git a/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-parameterserver/src/test/java/org/deeplearning4j/spark/parameterserver/BaseSparkTest.java b/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-parameterserver/src/test/java/org/deeplearning4j/spark/parameterserver/BaseSparkTest.java index d110e41bd..7a022a132 100644 --- a/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-parameterserver/src/test/java/org/deeplearning4j/spark/parameterserver/BaseSparkTest.java +++ b/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-parameterserver/src/test/java/org/deeplearning4j/spark/parameterserver/BaseSparkTest.java @@ -54,12 +54,6 @@ public abstract class BaseSparkTest extends BaseDL4JTest implements Serializable protected transient DataSet data; protected transient JavaRDD sparkData; - - @Override - public long getTimeoutMilliseconds() { - return 120000L; - } - @BeforeEach public void before() { diff --git a/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-parameterserver/src/test/java/org/deeplearning4j/spark/parameterserver/train/GradientSharingTrainingTest.java b/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-parameterserver/src/test/java/org/deeplearning4j/spark/parameterserver/train/GradientSharingTrainingTest.java index 31cd119d7..f535372b2 100644 --- a/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-parameterserver/src/test/java/org/deeplearning4j/spark/parameterserver/train/GradientSharingTrainingTest.java +++ b/cavis-dnn/cavis-dnn-spark/cavis-dnn-spark-parameterserver/src/test/java/org/deeplearning4j/spark/parameterserver/train/GradientSharingTrainingTest.java @@ -78,11 +78,6 @@ public class GradientSharingTrainingTest extends BaseSparkTest { @TempDir public File testDir; - @Override - public long getTimeoutMilliseconds() { - return 180000L; - } - @Test public void trainSanityCheck() throws Exception { diff --git a/cavis-ui/cavis-ui-model/src/test/java/org/deeplearning4j/ui/stats/TestTransferStatsCollection.java b/cavis-ui/cavis-ui-model/src/test/java/org/deeplearning4j/ui/stats/TestTransferStatsCollection.java index 5736cdb7a..3cf4ec7d9 100644 --- a/cavis-ui/cavis-ui-model/src/test/java/org/deeplearning4j/ui/stats/TestTransferStatsCollection.java +++ b/cavis-ui/cavis-ui-model/src/test/java/org/deeplearning4j/ui/stats/TestTransferStatsCollection.java @@ -40,11 +40,6 @@ import java.io.IOException; public class TestTransferStatsCollection extends BaseDL4JTest { - @Override - public long getTimeoutMilliseconds() { - return 90_000L; - } - @Test public void test() throws IOException { diff --git a/cavis-ui/cavis-ui-vertx/src/test/java/org/deeplearning4j/ui/TestVertxUIManual.java b/cavis-ui/cavis-ui-vertx/src/test/java/org/deeplearning4j/ui/TestVertxUIManual.java index eb3d19c51..d6f11df5e 100644 --- a/cavis-ui/cavis-ui-vertx/src/test/java/org/deeplearning4j/ui/TestVertxUIManual.java +++ b/cavis-ui/cavis-ui-vertx/src/test/java/org/deeplearning4j/ui/TestVertxUIManual.java @@ -41,6 +41,7 @@ import org.deeplearning4j.ui.model.storage.InMemoryStatsStorage; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Timeout; import org.nd4j.linalg.activations.Activation; import org.nd4j.linalg.dataset.api.iterator.DataSetIterator; import org.nd4j.common.function.Function; @@ -58,13 +59,9 @@ import static org.junit.jupiter.api.Assertions.*; @Slf4j //@Ignore +@Timeout(600) public class TestVertxUIManual extends BaseDL4JTest { - @Override - public long getTimeoutMilliseconds() { - return 3600_000L; - } - @AfterAll public void shutdownServer() throws InterruptedException { UIServer.getInstance().stop(); diff --git a/cavis-zoo/cavis-zoo-models/src/test/java/org/deeplearning4j/zoo/MiscTests.java b/cavis-zoo/cavis-zoo-models/src/test/java/org/deeplearning4j/zoo/MiscTests.java index 0bc1572e7..04a023596 100644 --- a/cavis-zoo/cavis-zoo-models/src/test/java/org/deeplearning4j/zoo/MiscTests.java +++ b/cavis-zoo/cavis-zoo-models/src/test/java/org/deeplearning4j/zoo/MiscTests.java @@ -37,11 +37,6 @@ import java.io.File; //@Ignore("Times out too often") public class MiscTests extends BaseDL4JTest { - @Override - public long getTimeoutMilliseconds() { - return Long.MAX_VALUE; - } - @Test public void testTransferVGG() throws Exception { DataSet ds = new DataSet(); diff --git a/cavis-zoo/cavis-zoo-models/src/test/java/org/deeplearning4j/zoo/TestImageNet.java b/cavis-zoo/cavis-zoo-models/src/test/java/org/deeplearning4j/zoo/TestImageNet.java index 8be3a65cc..04d1f8fce 100644 --- a/cavis-zoo/cavis-zoo-models/src/test/java/org/deeplearning4j/zoo/TestImageNet.java +++ b/cavis-zoo/cavis-zoo-models/src/test/java/org/deeplearning4j/zoo/TestImageNet.java @@ -57,11 +57,6 @@ import static org.junit.jupiter.api.Assertions.assertTrue; //@Ignore("Times out too often") public class TestImageNet extends BaseDL4JTest { - @Override - public long getTimeoutMilliseconds() { - return 90000L; - } - @Override public DataType getDataType(){ return DataType.FLOAT;