A Python web app to make thumbnails, based on llibvips, the fast image processing library with low memory needs.
This app is based on Flask for the web service, Celery and RabbitMq for the task management. For production, the webapp should probably run on a WSGI server like gunicorn The Pyramid framework would be a more complete alternative to Flask.
this has been tested on Ubuntu on WSL
sudo apt-get install gtk-doc-tools
sudo apt-get install gobject-introspectionbuild libvips from sources
git clone git://github.com/jcupitt/libvips.git
./autogen.sh
make
sudo make installinstall RabbitMq
sudo apt-get install rabbitmq-servercreate and activate virtual environment
pip install virtualenv
virtualenv venv
source venv/bin/activateinstall the dependencies with the command
pip install -r requirements.txtif pip is not available, try with
python -m pip <pip command>edit the file config.py pay attention especially to the variable UPLOAD_FOLDER
Workers can be started on several machines. On each machine several workers can be started.
Activate virtual env, if not already done
source venv/bin/activaterun Celery worker(s) with the following command
celery -A thumbnailerapp.services.tasks worker --loglevel=infoactivate virtual env, if not already done
source venv/bin/activatepython run.py