Skip to content

Commit 5a93592

Browse files
author
ggeop
committed
Remove dependencies version
1 parent bac2a08 commit 5a93592

File tree

2 files changed

+105
-110
lines changed

2 files changed

+105
-110
lines changed

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
language: python
2-
python:
3-
- "3.8"
2+
matrix:
3+
include:
4+
- name: "Ubuntu 20.04 Job"
5+
- os: linux
6+
- dist: focal
7+
48
install:
59
- sudo bash setup.sh
610
script:

setup.sh

Lines changed: 99 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -13,117 +13,108 @@ reset=`tput sgr0`
1313
# -----------------------------------
1414
# Python version compatibility check
1515
# -----------------------------------
16-
version=$(python -V 2>&1 | grep -Po '(?<=Python )(3.8.+)')
16+
version=$(python -V 2>&1 | grep -Po '(?<=Python )(.+)')
1717
if [[ -z "$version" ]]
1818
then
19-
echo "${red} No Python 3.8 in your system${reset}"
20-
21-
# echo "${green}Install Python 3.8 to our system${reset}"
22-
# sudo apt update
23-
# sudo apt install software-properties-common
24-
# sudo add-apt-repository -- yes ppa:deadsnakes/ppa
25-
# sudo apt install python3.8
26-
#
27-
# python_version=$(python3 --version)
28-
# echo "${green} System Python version after installation is: Python ${python_version} ${reset}"
19+
echo "${red} No Python 3.x.x in your system${reset}"
2920
else
3021
echo "${green} System Python version is: Python ${version} ${reset}"
3122
fi
3223

33-
##-----------------------------------
34-
## System dependencies installation
35-
##-----------------------------------
36-
#sudo apt-get update && /
37-
#sudo apt-get install build-essential && /
38-
#sudo apt-get install python3-dev && /
39-
#sudo apt-get install python3-setuptools && /
40-
#sudo apt-get install python3-pip && /
41-
#sudo apt-get install python3-venv && /
42-
#sudo apt-get install portaudio19-dev python3-pyaudio python3-pyaudio && /
43-
#sudo apt-get install libasound2-plugins libsox-fmt-all libsox-dev libxml2-dev libxslt-dev sox ffmpeg && /
44-
#sudo apt-get install espeak && /
45-
#sudo apt-get install libcairo2-dev libgirepository1.0-dev gir1.2-gtk-3.0 && /
46-
#sudo apt install mongodb && /
47-
#sudo apt-get install gnupg
48-
#
49-
## Reload local package database
50-
#sudo apt-get update
51-
#
52-
#RESULT=$?
53-
#if [ $RESULT -eq 0 ]; then
54-
# echo "${green} System dependencies installation succeeded! ${reset}"
55-
#else
56-
# echo "${red} System dependencies installation failed ${reset}"
57-
# exit 1
58-
#fi
59-
#
60-
##-----------------------------------
61-
## Create Jarvis virtual env
62-
##-----------------------------------
63-
#python3 -m venv $JARVIS_DIR/$VIRTUAL_ENV
64-
#
65-
#RESULT=$?
66-
#if [ $RESULT -eq 0 ]; then
67-
# echo "${green} Jarvis virtual env creation succeeded! ${reset}"
68-
#else
69-
# echo "${red} Jarvis virtual env creation failed ${reset}"
70-
# exit 1
71-
#fi
72-
#
73-
##-----------------------------------
74-
## Install Python dependencies
75-
##-----------------------------------
76-
#source $JARVIS_DIR/$VIRTUAL_ENV/bin/activate
77-
#
78-
#ACTIVATED_PYTHON_ENV=$(which python)
79-
#echo "${green} ${ACTIVATED_PYTHON_ENV} activated!${reset}"
80-
#
81-
## Install python requirements
82-
#pip3 install --upgrade cython
83-
#pip3 install -r $JARVIS_DIR/requirements.txt
84-
#
85-
#RESULT=$?
86-
#if [ $RESULT -eq 0 ]; then
87-
# echo "${green} Install Python dependencies succeeded! ${reset}"
88-
#else
89-
# echo "${red} Install Python dependencies failed ${reset}"
90-
# exit 1
91-
#fi
92-
#
93-
##-----------------------------------
94-
## Install nltk dependencies
95-
##-----------------------------------
96-
#python3 -c "import nltk; nltk.download('punkt'); nltk.download('averaged_perceptron_tagger')"
97-
#
98-
#RESULT=$?
99-
#if [ $RESULT -eq 0 ]; then
100-
# echo "${green} Install nltk dependencies succeeded! ${reset}"
101-
#else
102-
# echo "${red} Install nltk dependencies failed ${reset}"
103-
# exit 1
104-
#fi
105-
#
106-
##-----------------------------------
107-
## Create log access
108-
##-----------------------------------
109-
#sudo touch /var/log/jarvis.log && \
110-
#sudo chmod 777 /var/log/jarvis.log
111-
#
112-
#RESULT=$?
113-
#if [ $RESULT -eq 0 ]; then
114-
# echo "${green} Create log access succeeded! ${reset}"
115-
#else
116-
# echo "${red}Create log access failed ${reset}"
117-
# exit 1
118-
#fi
119-
#
120-
##-----------------------------------
121-
## Deactivate virtualenv
122-
##-----------------------------------
123-
#deactivate
124-
#
125-
##-----------------------------------
126-
## Finished
127-
##-----------------------------------
128-
#echo "${green} Jarvis setup succeed! ${reset}"
129-
#echo "Start Jarvis: bash run_jarvis.sh"
24+
#-----------------------------------
25+
# System dependencies installation
26+
#-----------------------------------
27+
sudo apt-get update && /
28+
sudo apt-get install build-essential && /
29+
sudo apt-get install python3-dev && /
30+
sudo apt-get install python3-setuptools && /
31+
sudo apt-get install python3-pip && /
32+
sudo apt-get install python3-venv && /
33+
sudo apt-get install portaudio19-dev python3-pyaudio python3-pyaudio && /
34+
sudo apt-get install libasound2-plugins libsox-fmt-all libsox-dev libxml2-dev libxslt-dev sox ffmpeg && /
35+
sudo apt-get install espeak && /
36+
sudo apt-get install libcairo2-dev libgirepository1.0-dev gir1.2-gtk-3.0 && /
37+
sudo apt install mongodb && /
38+
sudo apt-get install gnupg
39+
40+
# Reload local package database
41+
sudo apt-get update
42+
43+
RESULT=$?
44+
if [ $RESULT -eq 0 ]; then
45+
echo "${green} System dependencies installation succeeded! ${reset}"
46+
else
47+
echo "${red} System dependencies installation failed ${reset}"
48+
exit 1
49+
fi
50+
51+
#-----------------------------------
52+
# Create Jarvis virtual env
53+
#-----------------------------------
54+
python3 -m venv $JARVIS_DIR/$VIRTUAL_ENV
55+
56+
RESULT=$?
57+
if [ $RESULT -eq 0 ]; then
58+
echo "${green} Jarvis virtual env creation succeeded! ${reset}"
59+
else
60+
echo "${red} Jarvis virtual env creation failed ${reset}"
61+
exit 1
62+
fi
63+
64+
#-----------------------------------
65+
# Install Python dependencies
66+
#-----------------------------------
67+
source $JARVIS_DIR/$VIRTUAL_ENV/bin/activate
68+
69+
ACTIVATED_PYTHON_ENV=$(which python)
70+
echo "${green} ${ACTIVATED_PYTHON_ENV} activated!${reset}"
71+
72+
# Install python requirements
73+
pip3 install --upgrade cython
74+
pip3 install -r $JARVIS_DIR/requirements.txt
75+
76+
RESULT=$?
77+
if [ $RESULT -eq 0 ]; then
78+
echo "${green} Install Python dependencies succeeded! ${reset}"
79+
else
80+
echo "${red} Install Python dependencies failed ${reset}"
81+
exit 1
82+
fi
83+
84+
#-----------------------------------
85+
# Install nltk dependencies
86+
#-----------------------------------
87+
python3 -c "import nltk; nltk.download('punkt'); nltk.download('averaged_perceptron_tagger')"
88+
89+
RESULT=$?
90+
if [ $RESULT -eq 0 ]; then
91+
echo "${green} Install nltk dependencies succeeded! ${reset}"
92+
else
93+
echo "${red} Install nltk dependencies failed ${reset}"
94+
exit 1
95+
fi
96+
97+
#-----------------------------------
98+
# Create log access
99+
#-----------------------------------
100+
sudo touch /var/log/jarvis.log && \
101+
sudo chmod 777 /var/log/jarvis.log
102+
103+
RESULT=$?
104+
if [ $RESULT -eq 0 ]; then
105+
echo "${green} Create log access succeeded! ${reset}"
106+
else
107+
echo "${red}Create log access failed ${reset}"
108+
exit 1
109+
fi
110+
111+
#-----------------------------------
112+
# Deactivate virtualenv
113+
#-----------------------------------
114+
deactivate
115+
116+
#-----------------------------------
117+
# Finished
118+
#-----------------------------------
119+
echo "${green} Jarvis setup succeed! ${reset}"
120+
echo "Start Jarvis: bash run_jarvis.sh"

0 commit comments

Comments
 (0)