-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhxe_python_ml.sh
More file actions
executable file
·187 lines (128 loc) · 4.71 KB
/
hxe_python_ml.sh
File metadata and controls
executable file
·187 lines (128 loc) · 4.71 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
#!/bin/bash
#
# Enable eval with..
# %s/#eval \$cmd/eval \$cmd/g
#
# Disable eval with..
# %s/eval \$cmd/#eval \$cmd/g
echo ""
read -s -p "Enter hxeadm password: " hxeadmpw
cmd="echo The passwd is: $hxeadmpw"
echo $cmd
eval $cmd
echo ""
echo 'Verify that your /etc/hosts file contains hxehost.'
echo "Example.."
echo '192.168.124.14 hxehost'
echo ""
echo "In the VMWare console, login with.."
echo ""
echo "hxehost login: hxeadm"
echo "Password: $hxeadmpw"
echo "Get passwordless login of the hxeadm user setup."
zypper ar...
xs api https://hxehost:39030/ --skip-ssl-validation
// Stop everything but core procs
xs a | grep STARTED | grep -v hrtt-service | grep -v di-runner | grep -v di-core | grep -v deploy-service | cut -d ' ' -f 1 | while read -r line ; do echo "Stopping $line"; xs stop $line ; done
// Refresh the repo catalogs
zypper -n --gpg-auto-import-keys refresh
#as root
zypper -n --gpg-auto-import-keys install --no-recommends --auto-agree-with-licenses --force-resolution --type pattern devel_basis
zypper -n --gpg-auto-import-keys install --no-recommends --auto-agree-with-licenses --force-resolution tk-devel tcl-devel libffi-devel openssl-devel readline-devel sqlite3-devel ncurses-devel xz-devel zlib-devel nodejs wget git-core npm lynx jq libzip2 libzip inotify-tools
#as hxeadm
wget http://thedrop.sap-a-team.com/files/hana_ml-1.0.3.tar.gz
wget http://thedrop.sap-a-team.com/files/XS_PYTHON00_1-70003433.ZIP
wget https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tgz
tar xzvf Python-3.6.5.tgz
md python_3_6_5
cd Python-3.6.5
./configure --prefix=/usr/sap/HXE/HDB90/hxe_python_ml/python_3_6_5/ --exec-prefix=/usr/sap/HXE/HDB90/hxe_python_ml/python_3_6_5/ ; make -j4 ; make altinstall
cd ../python_3_6_5/bin
ln -s easy_install-3.6 easy_install
ln -s pip3.6 pip
ln -s pydoc3.6 pydoc
ln -s python3.6 python
ln -s pyvenv-3.6 pyvenv
xs create-runtime -p /usr/sap/HXE/HDB90/hxe_python_ml/python_3_6_5/
cd ../..
unzip XS_PYTHON00_1-70003433.ZIP -d sap_dependencies
git clone https://github.com/alundesap/mta_python_ml.git
. set_python_env.sh
#pip download -d vendor -r requirements.txt --find-links ../../sap_dependencies
#tar xzvf hana_ml-1.0.3.tar.gz
# for buildpack vendoring
pip download -d vendor -r requirements.txt --find-links ../../sap_dependencies --find-links ../../hana_ml-1.0.3.tar.gz hana_ml
# for local testing
pip install -r requirements.txt --find-links ../../sap_dependencies --find-links ../../hana_ml-1.0.3.tar.gz
pip install jupyter
jupyter notebook --generate-config
pip install sklearn
pip install mxnet
pip install tensorflow
pip install python-mnist
pip install boto3
# for CF stuff
# As root
wget -O cf-cli-installer_latest.rpm https://cli.run.pivotal.io/stable?release=redhat64
rpm -Uvh cf-cli-installer_latest.rpm
#as hxeadm
cf api https://api.cf.us10.hana.ondemand.com
#get latest from here.
#https://tools.hana.ondemand.com/#cloud
cf install-plugin cf-cli-mta-plugin-2.0.3-linux-x86_64.bin
#vim setup as hxeadm
user vimrc file: "$HOME/.vimrc"
mkdir -p $HOME/.vim
touch $HOME/.vimrc
git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim
#Add to top of $HOME/.vimrc
set nocompatible " required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
" Add all your plugins here (note older versions of Vundle used Bundle instead of Plugin)
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
# in vim run this.
:PluginInstall
#Add to bottom of $HOME/.vimrc
"split navigations
nnoremap <C-J> <C-W><C-J>
nnoremap <C-K> <C-W><C-K>
nnoremap <C-L> <C-W><C-L>
nnoremap <C-H> <C-W><C-H>
" Enable folding
set foldmethod=indent
set foldlevel=99
" Enable folding with the spacebar
nnoremap <space> za
:w
Plugin 'tmhedberg/SimpylFold'
# in vim run this.
:PluginInstall
#Add to bottom of $HOME/.vimrc
au BufNewFile,BufRead *.py
\ set tabstop=4
\ set softtabstop=4
\ set shiftwidth=4
\ set textwidth=79
\ set expandtab
\ set autoindent
\ set fileformat=unix
" au BufNewFile,BufRead *.js, *.html, *.css set tabstop=2 set softtabstop=2 set shiftwidth=2
Plugin 'vim-scripts/indentpython.vim'
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
set encoding=utf-8
let python_highlight_all=1
syntax on
Plugin 'scrooloose/nerdtree'
"Plugin 'scrooloose/nerdtree-tabs'
Plugin 'Xuyuanp/nerdtree-git-plugin'
Plugin 'tpope/vim-fugitive'
"Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}