satnogs-wut/docs/README-voila.md

58 lines
1.7 KiB
Markdown
Raw Permalink Normal View History

2020-01-20 23:47:27 -07:00
# Voila
Voila is a way to turn Jupyter notebooks into web applications.
# Install
Start with basic Debian Buster install.
```
2020-01-21 00:48:17 -07:00
# set up partitions
# XXX deps...
sudo apt update
2022-05-28 18:33:55 -06:00
sudo apt install apache2 python3-certbot-apache python3-pip sshfs npm nodejs
2020-01-21 00:48:17 -07:00
certbot
systemctl restart apache2
adduser wut
sudo su - wut
2022-05-29 15:46:39 -06:00
pip3 install --user --upgrade pip
2020-01-21 00:48:17 -07:00
# make sure new `pip3` at `~/.local/bin/pip3` is in front in `$PATH`.
2022-05-29 15:46:39 -06:00
echo 'PATH=~/.local/bin:$PATH' >> ~/.bashrc
```
2022-05-28 18:33:55 -06:00
logout #log back in as user wut
2020-01-21 00:48:17 -07:00
sudo su - wut
2022-05-28 18:33:55 -06:00
# Install Python packages for Voila
pip3 install --user --upgrade -r requirements-voila.txt
# Enable Jupyter extensions
jupyter nbextension enable --py widgetsnbextension
2022-05-29 22:49:53 -06:00
#jupyter labextension install @jupyter-widgets/jupyterlab-manager
#jupyter serverextension enable --py jupyterlab --user
2020-01-20 23:47:27 -07:00
```
2022-05-28 18:33:55 -06:00
* Set up hosts file, network, etc.
2020-01-22 17:01:59 -07:00
2022-05-28 18:33:55 -06:00
* Set up apache proxy
2020-01-22 17:01:59 -07:00
2020-01-23 16:53:04 -07:00
```
2022-05-28 18:33:55 -06:00
# Cruft to start voila:
cd /srv/satnogs/satnogs-wut/notebooks/
voila \
--ExecutePreprocessor.timeout=600 \
--no-browser \
--port=8867 \
--autoreload=True \
--Voila.ip=localhost \
--VoilaConfiguration.enable_nbextensions=False \
2022-05-29 22:57:06 -06:00
--theme=dark \
2022-05-28 18:33:55 -06:00
wut-web.ipynb \
1>>~/log/voila.log 2>>~/log/voila.err &
2020-01-22 17:01:59 -07:00
```
2022-05-28 18:33:55 -06:00
2020-01-20 23:47:27 -07:00
# wut?
Site:
2022-05-28 18:33:55 -06:00
* https://spacecruft.org/spacecruft/satnogs-wut/
2020-01-20 23:47:27 -07:00