karoo_gp/README.md

189 lines
4.7 KiB
Markdown
Raw Permalink Normal View History

2020-02-21 17:12:01 -07:00
# SpaceCruft Fork
This is a SpaceCruft fork of https://github.com/kstaats/karoo_gp
2015-11-04 04:05:31 -07:00
# Karoo GP
2016-07-16 12:48:59 -06:00
Karoo GP is an evolutionary algorithm, a genetic programming application suite written in Python which supports both
2017-02-09 18:32:37 -07:00
symbolic regression and classification data analysis. It is ready to work with your datasets, is multicore and GPU
enabled by means of the powerful library TensorFlow. The packge includes a Desktop application with an intuitive user
2018-04-22 15:03:06 -06:00
interface, and a Server application which supports fully scripted runs. Output is automatically archived. Batteries
included. No programming required.
2019-06-09 00:02:43 -06:00
For an interesting read on scalar vs vector, and CPU vs GPU performance with Karoo GP:
2018-04-22 15:03:06 -06:00
https://arxiv.org/abs/1708.03157
Be certain to read the User Guide!!!
2015-11-04 04:05:31 -07:00
2016-07-16 12:48:59 -06:00
Learn more at <a href="http://kstaats.github.io/karoo_gp/">kstaats.github.io/karoo_gp/</a> ...
2018-04-22 15:03:06 -06:00
2020-02-21 17:12:50 -07:00
# Debian Install
2020-02-21 18:58:21 -07:00
To install on Debian (Buster/Stable/10):
2020-02-21 17:12:50 -07:00
```
# Install Dependencies:
sudo apt install python3 python3-pip python3-venv
# Clone repo (choose this one or upstream):
# git clone https://github.com/kstaats/karoo_gp
git clone https://spacecruft.org/spacecruft/karoo_gp
# Setup
cd karoo_gp
python3 -m venv .venv
source .venv/bin/activate
# Install python dependencies
pip3 install wheel
pip3 install numpy==1.16.4 sympy==1.4 tensorflow==1.13.1 scikit-learn==0.21.2
# Run application
python3 karoo_gp.py
```
2020-02-21 18:58:21 -07:00
# Tensorflow 2 Install
Using karoo_gp with Tensorflow 2 on Debian (Buster/Stable/10).
```
# Install Dependencies:
sudo apt install python3 python3-pip python3-venv
# Clone repo (choose this one or upstream):
# git clone https://github.com/kstaats/karoo_gp
git clone https://spacecruft.org/spacecruft/karoo_gp
# Setup
cd karoo_gp
python3 -m venv .venv
source .venv/bin/activate
pip3 install --upgrade pip
pip3 install --upgrade setuptools
# Install python dependencies
pip3 install wheel
2020-02-21 19:02:27 -07:00
pip3 install sklearn sympy
2020-02-21 18:58:21 -07:00
# This will install Tensorflow 2.1:
pip3 install tensorflow
# Run application
python3 karoo_gp.py
```
2020-02-21 21:02:33 -07:00
2020-02-21 21:28:40 -07:00
# Jupyter
Jupyter is a cute interface to python.
## Jupyter Install
2020-02-21 21:02:33 -07:00
To install everything for jupyter, not in virt env... Thusly:
```
# Install Dependencies:
sudo apt install python3 python3-pip
# Clone repo (choose this one or upstream):
git clone https://spacecruft.org/spacecruft/karoo_gp
# Setup
cd karoo_gp
git checkout jupyter
pip3 install --user --upgrade pip
pip3 install --user --upgrade setuptools
# Install python dependencies
pip3 install --user wheel
pip3 install --user sklearn sympy
# This will install Tensorflow 2.1:
pip3 install --user tensorflow
```
2020-02-21 21:28:40 -07:00
## Run Jupyter
2020-02-21 21:02:33 -07:00
Copy the `foo` to an appropriate place. Run similar to this:
```
jupyter-lab \
--config=/home/jebba/.jupyter/jupyter_karoo_gp_config.py \
--debug \
--notebook-dir=/home/jebba/devel/spacecruft/karoo_gp \
--app-dir=/home/jebba/.local/share/jupyter/lab \
1>>/home/jebba/log/karoo.log 2>>/home/jebba/log/karoo.err &
```
2020-02-21 21:28:40 -07:00
# Voila
Voila can take Jupyter notebooks and turn them into websites.
Example site below:
* https://karoo.spacecruft.org/
## Install Voila
See other docs, maybe in satnogs-wut.
```
# Install Dependencies:
sudo apt install python3 python3-pip python3-venv
# Clone repo:
git clone https://spacecruft.org/spacecruft/karoo_gp
# Setup
cd karoo_gp
git checkout jupyter
pip3 install --user --upgrade pip
pip3 install --user --upgrade setuptools
# Install python dependencies
pip3 install --user wheel
pip3 install --user sklearn sympy
# This will install Tensorflow 2.1:
pip3 install --user tensorflow
```
## Voila Apache
Snippet of apache code to set up proxy using Certbot.
```
<VirtualHost karoo.spacecruft.org:443>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
#LoadModule proxy_module modules/mod_proxy.so
#LoadModule proxy_http_module modules/mod_proxy_http.so
RequestHeader set X-Forwarded-Proto 'https'env=HTTPS
RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]
RewriteRule /(.*) ws://127.0.0.1:8221/$1 [P]
<Location />
ProxyPass http://127.0.0.1:8221/
</Location>
ProxyVia On
ProxyPreserveHost On
Include /etc/letsencrypt/options-ssl-apache.conf
ServerName karoo.spacecruft.org
SSLCertificateFile /etc/letsencrypt/live/wut.spacecruft.org/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/wut.spacecruft.org/privkey.pem
</VirtualHost>
```
2020-02-21 21:42:26 -07:00
## Voila Start
Start with `voila` something like this:
```
voila \
--ExecutePreprocessor.timeout=600 \
--no-browser \
--port=8221 \
--theme=dark \
--autoreload=True \
--template=default \
--Voila.ip=localhost \
--VoilaConfiguration.enable_nbextensions=False \
karoo_gp.ipynb
```