-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_venvs.sh
executable file
·51 lines (40 loc) · 2.09 KB
/
install_venvs.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
51
#!/usr/bin/bash
#
# Installs virtual environment and dependent packages, as required to work with
# the DVS frameworks.
# Ensure that your github ssh keys have been activated!
#
pip install virtualenv
virtualenv -p python3 ~/venv-py3
## IMPORTANT: always work in this python3 environment
source ~/venv-py3/bin/activate
pip install --upgrade pip
pip cache purge
pip install ipykernel jupyter notebook
ipython3 kernel install --name "python3" --user
pip install numpy scipy matplotlib
pip install pysolr paramiko zernike
pip install git+https://github.com/ska-sa/{scape,katdal,katversion,katpoint,katsdpcal}
# pip install git+ssh://[email protected]/ska-sa/dvsholog
# TODO: At present, the above package is private - a temporary situation. The workaround is the following:
pip install gdown
gdown 1X1CdggMPIgR5xRoeGd2LajHRixf_mVtM && pip install dvsholog-main.zip && rm dvsholog-main.zip
pip install git+https://github.com/telegraphic/PyGSM
PY=`ls ~/venv-py3/lib/`
mv ~/venv-py3/lib/$PY/site-packages/pygsm/gsm2016_components.h5 ~/venv-py3/lib/$PY/site-packages/pygsm/gsm2016_components.h5~
wget -O ~/venv-py3/lib/$PY/site-packages/pygsm/gsm2016_components.h5 https://zenodo.org/record/3479985/files/gsm2016_components.h5?download=1
## Set up the DVS workspace
git clone https://github.com/ska-sa/dvs.git
git clone https://github.com/ska-sa/katsdpscripts.git
# git clone [email protected]:ska-sa/systems-analysis.git
# TODO: At present, the above package is private - a temporary situation. The workaround is the following:
gdown 1Ep3o1mElx2YsJM_B4Hh6j_LKU4mkFYpU && unzip systems-analysis-master.zip -d systems-analysis && rm systems-analysis-master.zip
ln -f -s `pwd`/systems-analysis/analysis dvs/libraries/analysis
ln -f -s `pwd`/katsdpscripts/katsdpscripts dvs/libraries/katsdpscripts
ipython3 kernel install --name "dvs" --user
# Add a custom pythonpath
KS=`jupyter kernelspec list | sed -n -E 's/\s*(dvs)\s+(\S+)/\2/p'`/kernel.json
PK=\"env\":{\"PYTHONPATH\":\"`pwd`/dvs\"}
sed -i -E ':a; N; $! ba; s@(.*)}@\1,'$PK'\n}@' $KS
echo You may start the notebook server by using the following command:
echo `readlink -f dvs/startjnb`