-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpostBuild
executable file
·87 lines (73 loc) · 2.03 KB
/
postBuild
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
78
79
80
81
82
83
84
85
86
87
#!/bin/bash
set -e
GOVERS=1.17.6
mkdir -p \
$HOME/.local/go/$GOVERS \
$HOME/go
echo "::: install Go ${GOVERS}..."
curl -O -L https://golang.org/dl/go${GOVERS}.linux-amd64.tar.gz
tar -C $HOME/.local/go/$GOVERS -zxf go${GOVERS}.linux-amd64.tar.gz
/bin/rm go${GOVERS}.linux-amd64.tar.gz
export GOROOT=$HOME/.local/go/$GOVERS/go
export GOPATH=$HOME/go
export GO111MODULE=on
export PATH=$GOPATH/bin:$GOROOT/bin:$PATH
## install interesting packages
echo "::: installing gophernotes, gonum..."
go get golang.org/x/tools/cmd/goimports
go install github.com/gopherdata/gophernotes@latest
go get github.com/goml/gobrain
go get gonum.org/v1/plot/...
go get gonum.org/v1/gonum/...
go get github.com/go-gota/gota/...
go get github.com/sajari/regression
go get github.com/sjwhitworth/golearn/...
go get go-hep.org/x/hep/csvutil/...
go get go-hep.org/x/hep/fit
go get go-hep.org/x/hep/hbook
go get github.com/montanaflynn/stats
go get github.com/boltdb/bolt
go get github.com/patrickmn/go-cache
go get github.com/chewxy/math32
go get github.com/chewxy/hm
go get gorgonia.org/vecf64
go get gorgonia.org/vecf32
go get github.com/awalterschulze/gographviz
go get github.com/leesper/go_rng
go get github.com/pkg/errors
go get github.com/stretchr/testify/assert
echo "::: installing gophernotes, gonum... [done]"
## setup environment for Go
cat >> $HOME/.setup-go << EOF
## setup Go
export GOROOT=$GOROOT
export GOPATH=$GOPATH
export GO111MODULE=on
export PATH=\$GOPATH/bin:\$GOROOT/bin:\$PATH
EOF
cat >> $HOME/.bashrc << EOF
. ~/.setup-go
EOF
## install the Go kernel
mkdir -p ./binder/gophernotes
cat >| ./binder/gophernotes/kernel.json << EOF
{
"argv": [
"$GOPATH/bin/gophernotes",
"{connection_file}"
],
"display_name": "Go",
"language": "go",
"name": "go",
"env": {
"GOPATH": "$GOPATH",
"GOROOT": "$GOROOT",
"GO111MODULE": "on",
"PATH": "$GOPATH/bin:$GOROOT/bin:$PATH"
}
}
EOF
jupyter kernelspec install ./binder/gophernotes --user
/bin/rm -rf binder
echo "::: kernel list"
jupyter kernelspec list