Repository navigation
Expand file tree
/
Copy pathbuild.gradle
More file actions
77 lines (63 loc) · 2.25 KB
/
Copy pathbuild.gradle
File metadata and controls
77 lines (63 loc) · 2.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
plugins {
id 'org.hidetake.ssh' version '2.8.0'
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'application'
repositories {
jcenter()
mavenCentral()
}
mainClassName="main.CnnSentenceClassification"
dependencies {
compile group: 'org.deeplearning4j', name: 'deeplearning4j-core', version: '0.9.1'
compile group: 'org.deeplearning4j', name: 'deeplearning4j-nlp', version: '0.9.1'
compile group: 'org.nd4j', name: 'nd4j-native-platform', version: '0.9.1'
compile group: 'org.nd4j', name: 'nd4j-api', version: '0.9.1'
compile "org.slf4j:slf4j-simple:1.7.25"
compile "org.slf4j:slf4j-api:1.7.25"
compile group: 'org.bytedeco.javacpp-presets', name: 'opencv', version: '3.2.0-1.3'
}
applicationDefaultJvmArgs = ["-Xmx40g", "-d64", "-XX:+UseParallelGC", "-server" ,"-Djava.library.path=\"\""]
ssh.settings {
dryRun = project.hasProperty('dryRun')
}
remotes {
server {
host = '10.10.4.10'
user = 'farshad'
identity = file("${System.properties['user.home']}/.ssh/id_rsa")
}
}
task showPlatformVersion << {
println ssh.version
ssh.run {
session(remotes.server) {
execute 'uname -a'
execute 'cat /etc/*-release', ignoreError: true
}
}
}
task deploy(dependsOn: installDist) << {
ssh.run {
session(remotes.server) {
execute 'rm -rf ./java/DeepLearningCNN'
put from: './build/install/DeepLearningCNN', into: './java/'
execute 'chmod +x ./java/DeepLearningCNN/bin/DeepLearningCNN'
execute 'cd ./java/DeepLearningCNN/bin && ./DeepLearningCNN'
get from: './java/DeepLearningCNN/bin/2class.zip', into: '.'
}
}
}
task deployZip(dependsOn: distTar) << {
ssh.run {
session(remotes.server) {
execute 'rm -rf ./java/DeepLearningCNN'
put from: './build/distributions/DeepLearningCNN.tar', into: './java/'
execute 'cd ./java && tar -xf DeepLearningCNN.tar'
execute 'cd ./java && chmod +x DeepLearningCNN/bin/DeepLearningCNN'
execute 'cd ./java/DeepLearningCNN/bin && ./DeepLearningCNN'
get from: './java/DeepLearningCNN/bin/2class.zip', into: '.'
}
}
}