Server to run Amen analysis and return JSON results.
uploaders/s3.py
docker build -t amen-server-test .
docker run -p 4000:80 amen-server-test
curl -X POST -F "file=@amen.mp3;type=audio/mpeg" http://localhost:4000
docker stop $(docker ps -q)
uploaders/s3.py
uploaders/s3.py
/amen-server
, as that's what the below nginx config uses.Set up NGINX with proper ports and routes, and get it running:
sudo apt-get update
sudo apt-get install nginx
/etc/nginx/sites-enabled/default
, under listen [::]:80 default_server;
:location /amen-server {
proxy_pass http://localhost:4000/amen-server;
client_max_body_size 8M;
}
sudo service nginx start
sudo apt-get install docker.io
ubuntu
) to the docker group, so we can run without sudo: sudo gpasswd -a $USER docker
docker build -t amen-server-test .
docker run -p 4000:80 amen-server-test
curl -X POST -F "file=@amen.mp3;type=audio/mpeg" http://<your-aws-url>/amen-server
Amen is computationally heavy, and is a Python library. It could be faster. The mean processing time for a 3:30 audio track on a AWS free-tier t2.micro is 20.5 seconds - that drops to 16.4 seconds on an AWS c4 machine. Plan accordingly.