forked from openvinotoolkit/training_extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init_venv.sh
executable file
·37 lines (29 loc) · 1.15 KB
/
init_venv.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
#!/usr/bin/env bash
work_dir=$(realpath "$(dirname $0)")
cd ${work_dir}
if [[ -e venv ]]; then
echo "Please remove a previously virtual environment folder '${work_dir}/venv'."
exit
fi
virtualenv venv -p python3 --prompt="(pytorch-toolbox) "
echo "export PYTHONPATH=\$PYTHONPATH:${work_dir}" >> venv/bin/activate
. venv/bin/activate
pip install -r ${work_dir}/requirements.txt
# Download and setup 3rd party repo
git submodule update --init --recommend-shallow ../../external/deep-object-reid
cd ../../external/deep-object-reid
pip install -r requirements.txt
python setup.py develop
cd -
# Install OpenVino Model Optimizer (optional)
mo_requirements_file="${INTEL_OPENVINO_DIR:-/opt/indel/openvino}/deployment_tools/model_optimizer/requirements_onnx.txt"
if [[ -e "${mo_requirements_file}" ]]; then
pip install -qr ${mo_requirements_file}
else
echo "Model optimizer requirements were not installed. Please install the OpenVino toolkit to use one."
fi
echo
echo "===================================================="
echo "To start to work, you need to activate a virtualenv:"
echo "$ . venv/bin/activate"
echo "===================================================="