forked from JarbasAI/ZZZ-JarbasAI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_mark1.sh
executable file
·112 lines (95 loc) · 2.61 KB
/
install_mark1.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
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
#!/usr/bin/env bash
######################################################
# dev_setup.sh
# @author sean.fitzgerald (aka clusterfudge)
#
# The purpose of this script is to create a self-
# contained development environment using
# virtualenv for python dependency sandboxing.
# This script will create a virtualenv (using the
# conventions set by virtualenv-wrapper for
# location and naming) and install the requirements
# laid out in requirements.txt, pocketsphinx, and
# pygtk into the virtualenv. Mimic will be
# installed and built from source inside the local
# checkout.
#
# The goal of this script is to create a development
# environment in user space that is fully functional.
# It is expected (and even encouraged) for a developer
# to work on multiple projects concurrently, and a
# good OSS citizen respects that and does not pollute
# a developers workspace with it's own dependencies
# (as much as possible).
# </endRant>
######################################################
# exit on any error
set -Ee
if [ $(id -u) -eq 0 ]; then
echo "This script should not be run as root or with sudo."
exit 1
fi
sudo apt-get install -y \
git \
python \
python-dev \
python-setuptools \
python-virtualenv \
python-gobject-dev \
virtualenvwrapper \
libtool \
libffi-dev \
libssl-dev \
autoconf \
automake \
bison \
swig \
libglib2.0-dev \
s3cmd \
portaudio19-dev \
mpg123 \
screen \
flac \
curl \
libicu-dev \
pkg-config \
automake \
libjpeg-dev \
python-opencv \
libfann-dev \
libgmp-dev \
gnupg
TOP=$(cd $(dirname $0) && pwd -L)
if [ -z "$WORKON_HOME" ]; then
VIRTUALENV_ROOT=${VIRTUALENV_ROOT:-"${HOME}/.virtualenvs/jarbas"}
else
VIRTUALENV_ROOT="$WORKON_HOME/jarbas"
fi
cd "${TOP}"
easy_install pip
# install requirements (except pocketsphinx)
# removing the pip2 explicit usage here for consistency with the above use.
if ! pip install -r requirements_light.txt; then
echo "Warning: Failed to install all requirements. Continue? y/N"
read -n1 continue
if [[ "$continue" != "y" ]] ; then
exit 1
fi
fi
SYSMEM=$(free|awk '/^Mem:/{print $2}')
MAXCORES=$(($SYSMEM / 512000))
CORES=$(nproc)
if [[ ${MAXCORES} -lt ${CORES} ]]; then
CORES=${MAXCORES}
fi
echo "Building with $CORES cores."
#build and install pocketsphinx
#cd ${TOP}
#${TOP}/scripts/install-pocketsphinx.sh -q
#build and install mimic
cd "${TOP}"
# install pygtk for desktop_launcher skill
# "${TOP}/scripts/install-pygtk.sh" " ${CORES}"
# md5sum requirements.txt dev_setup.sh > .installed
# PicoTTS
"${TOP}/scripts/install-pico.sh"