-
Notifications
You must be signed in to change notification settings - Fork 7
/
start_demo.sh
executable file
·39 lines (32 loc) · 1.42 KB
/
start_demo.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
#!/bin/bash
#################################################################################
# Copyright (c) 2022 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License 2.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#################################################################################
#####################################################################################
# Pre-requisites:
# Must have python 3.7 installed and 'python3.7' in your PATH
# Must have docker-compose on PATH
# Must have docker service running
#####################################################################################
docker-compose -f services/docker-compose.yml down
docker-compose -f services/docker-compose.yml up -d
PYTHON_VENV_DIR="./venv"
if [ ! -d ${PYTHON_VENV_DIR} ]
then
echo "Creating venv for space rover gesture control service in ${PYTHON_VENV_DIR}"
python3.7 -m venv ${PYTHON_VENV_DIR}
fi
source ${PYTHON_VENV_DIR}/bin/activate
pip install -r gestures/openCV_implementation/src/requirements.txt
while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:9070/health)" != "200" ]];
do
sleep 5
echo "waiting for game service to come online"
done
python3 gestures/openCV_implementation/src/GestureRecognitionCVv2.py