forked from nouiz/jetpack
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
executable file
·72 lines (65 loc) · 1.53 KB
/
run.sh
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
#!/usr/bin/env bash
usage="$(basename "$0") [package] -- run the selected package and have it connect to the outside
where:
package - one of
graphlab
h2o
julia
theano
vw
mllib
"
if [ $# -eq 0 ]
then
echo "No arguments supplied"
echo "$usage"
exit 1
fi
get_host() {
local __resultvar=$1
#local myresult="$(expr substr $(uname -s) 1 5)"
local myresult_s="$(uname -s)"
if [ $myresult_s = "Darwin" ]; then
eval $__resultvar="'$myresult_s'"
else
local myresult="$(uname -o)"
eval $__resultvar="'$myresult'"
fi
}
get_host host_result
myopen() {
if [ $host_result = "GNU/Linux" ]; then
xdg-open $1
else
open $1
fi
}
case "$1" in
graphlab)
echo "Please input your GraphLab Create product key:"
read GRAPHLAB_PRODUCT_KEY
docker run -e "GRAPHLAB_PRODUCT_KEY=$GRAPHLAB_PRODUCT_KEY" -d -p 8997:8997 startupml/graphlab
sleep 2 && myopen http://localhost:8997
;;
h2o)
docker run -d -p 8996:8996 startupml/h2o
sleep 3 && myopen http://localhost:8996
;;
julia)
docker run -d -p 8998:8998 startupml/julia
sleep 2 && myopen http://localhost:8998
;;
theano)
docker run -d -p 8999:8999 startupml/theano
sleep 2 && myopen http://localhost:8999
;;
vw)
docker run -it --rm startupml/vowpal_wabbit vw
;;
mllib)
docker run -i -t startupml/mllib /etc/bootstrap.sh -bash
;;
deeplearning4j)
docker run -it startupml/deeplearning4j /bin/bash
;;
esac