Husky AI is part of my machine learning attack series. This repo contains the models and code to run the Husky AI web server.
Have fun learning more about machine learning!
The Husky AI web application is in the /webapp
folder.
docker build . -t huskyai_webapp
docker run -p 8000:20080 huskyai_webapp
The application is then available at: https://localhost:8000/.
pip install -r requirements.txt
#generate a key pair (e.g. for testing on localhost)
openssl ecparam -genkey -name secp384r1 -out server.key
openssl req -new -x509 -sha256 -key server.key -out server.crt -days 7300 -subj '/CN=localhost:8000/O=huskyai/C=US'
python huskyai.py
The application is then available at: http://localhost:20080
You can use something like flock
and a simple crontab
entry also.
sudo crontab -e
Use flock
to make sure Python web server is running at all times (simple solution):
* * * * * /usr/bin/flock -n /tmp/huskyai.lock su - husky -c "cd /opt/huskyai/ && python huskyai.py"