monet is a distributed image generation system for the neural-doodle project.
monet uses a task queue and publish/subscribe messaging to scale its workers' pool across a cluster. monet provides an HTTP API to get a list of installed artworks, add new tasks to the queue, query progress, and get intermediate or final results.
- API Endpoint
- Task Runner
- Nerual-Doodle Docker Container Images
- Docker, Docker Compose
>= 1.11
,>= 1.7.0
-
docker-compose up
: to start all services -
docker-compose up -d
: to start the services in the background -
docker-compose down
: to stop the services -
docker-compose exec monet-api npm run gulp
: to recreate theartworks
collection inside themonet-artwork-db
container and import sample data from theartworks
directory to the service database -
docker-compose -f docker-compose.yml -f docker-compose.gpu.yml ...
: to work with the GPU variant of the neural-doodle image -
docker-compose -f docker-compose.yml -f docker-compose.development.yml [-f docker-compose.gpu.yml] ...
: to mount project directories on the host machine under project directories inside containers to allow instant source changes throughout development without rebuilds
-
docker-compose pull
: to download pre-built images from Docker Hub on every node -
docker-compose up [-d]
: to start all services -
docker-compose exec monet-api npm run gulp
: to import sample data from theartworks
directory to the service database -
docker-compose scale monet-agent=<number of instances>
: to start a specific number of instances of the monet-agent and spread them across the cluster
To get a list of artworks available to transfer styles from
curl https://localhost:8080/artworks
To submit a doodle file doodle.png
for processing
(echo -n '{ "artworkID": "<some artwork ID returned from the previous step>", "map": "'; base64 doodle.png; echo '" }') |
curl -H "Content-Type: application/json" -d @- https://localhost:8080/process
To check the progress and get intermediate or final results
curl https://localhost:8080/tasks/<task ID returned from the previous step>
On Windows and OS X setups with Docker Toolbox replace localhost with an IP address of a virtual machine used by Docker.
For example, to get an IP address of the default Docker virtual machine, execute the following
docker-machine ip default
monet is licensed under the MIT license. See LICENSE for the full license text.
Neural Doodle is developed by Alex J. Champandard.
monet was created by Dmitrii Toksaitov.