-
Notifications
You must be signed in to change notification settings - Fork 1
/
creating_env_ak_sw_benchmarker.sh
51 lines (39 loc) · 1.32 KB
/
creating_env_ak_sw_benchmarker.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
#!/bin/bash
# Project: ak-size-estimation Azure Kinect Size Estimation & Weight Prediction Benchmarker https://github.com/GRAP-UdL-AT/ak_sw_benchmarker/
#
# * PAgFRUIT http://www.pagfruit.udl.cat/en/
# * GRAP http://www.grap.udl.cat/
#
# Author: Juan Carlos Miranda. https://github.com/juancarlosmiranda/
set -e
FILENAME_ZIP='ak_sw_benchmarker-main.zip'
REQUERIMENTS_LINUX='requirements_linux.txt'
# commands definitions
PYTHON_CMD='python3'
UNZIP_CMD=`which unzip`
MKDIR_CMD='mkdir -p'
CHMOD_CMD='chmod 755'
PIP_INSTALL_CMD='pip install'
PIP_UPDATE_CMD='pip install --upgrade pip'
# files extensions names
EXT_SCRIPTS_SH='*.sh'
EXT_ZIP='.zip'
# folders names definitions
DEVELOPMENT_PATH='development'
DEVELOPMENT_ENV_PATH='development_env'
COMMON_ENV_PATH='bin/activate'
# software folders names
SIZE_ESTIMATION_NAME='ak_sw_benchmarker-main'
# project folders
ROOT_FOLDER_F=$HOME/$DEVELOPMENT_PATH/
SIZE_ESTIMATION_NAME_F=$ROOT_FOLDER_F$SIZE_ESTIMATION_NAME/
# environment folders
ENV_NAME='_venv'
ROOT_ENV_F=$HOME/$DEVELOPMENT_ENV_PATH/
SIZE_ESTIMATION_NAME_ENV_F=$ROOT_ENV_F$SIZE_ESTIMATION_NAME$ENV_NAME/
# creating environments automatically
$PYTHON_CMD -m venv $SIZE_ESTIMATION_NAME_ENV_F
source $SIZE_ESTIMATION_NAME_ENV_F$COMMON_ENV_PATH
$PIP_UPDATE_CMD
$PIP_INSTALL_CMD -r $SIZE_ESTIMATION_NAME_F$REQUERIMENTS_LINUX
deactivate