forked from harelba/q
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prepare-benchmark-env
executable file
·44 lines (35 loc) · 938 Bytes
/
prepare-benchmark-env
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
#!/bin/bash
set -e
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
source benchmark-config.sh
if [ ! -f ./benchmark_data.tar.gz ];
then
echo benchmark data not found. downloading it
curl "https://s3.amazonaws.com/harelba-q-public/benchmark_data.tar.gz" -o ./benchmark_data.tar.gz
else
echo no need to download benchmark data
fi
if [ ! -d ./_benchmark_data ];
then
echo extracting benchmark data
tar xvfz benchmark_data.tar.gz
echo benchmark data is ready
else
echo no need to extract benchmark data
fi
for ver in "${BENCHMARK_PYTHON_VERSIONS[@]}"
do
echo installing $ver
pyenv install -s $ver
venv_name=q-benchmark-$ver
echo create venv $venv_name
pyenv virtualenv -f $ver $venv_name
echo activate venv $venv_name
pyenv activate $venv_name
pyenv version
echo installing requirements $venv_name
pip install -r ./requirements.txt
echo deactivating $venv_name
pyenv deactivate
done