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-introspection
build libvips from sources
git clone git://github.com/jcupitt/libvips.git
./autogen.sh
make
sudo make install
install RabbitMq
sudo apt-get install rabbitmq-server
create and activate virtual environment
pip install virtualenv
virtualenv venv
source venv/bin/activate
install the dependencies with the command
pip install -r requirements.txt
if 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/activate
run Celery worker(s) with the following command
celery -A thumbnailerapp.services.tasks worker --loglevel=info
activate virtual env, if not already done
source venv/bin/activate
python run.py