Docker / Node.js / Python - image processing box
1.3K
This repo will contain all setup and code of the worker box for the face-the-internet project. This box is only responsable of getting images and processing them.
Dockerfile contains the definition of the whole system
(base OS, all required libraries and packages, setup commands)python-shell npm module to achieve thatdocker-machine create --driver virtualbox dev
eval "$(docker-machine env dev)"
So what you want to do now, is to build an image into your VM container using our Dockerfile.
To be able to develop and test, you'll also want to run it while mapping /app to your local copy of the repo,
this way your local changes to the code are reflected to the VM container:
docker run -v $HOME/Sites/face-the-internet-worker:/app -t -i eduwass/face-the-internet-worker
This will build the image using the latest Dockerfile found in the GitHub repo.
If it's the first time you are building the Docker image this will take a while (around 20 mins).
Note: If you make changes to Dockerfile you'll want to rebuild, to do that, remove the image with:
docker rmi --force eduwass/face-the-internet-worker
And then do the previous docker run command again to rebuild from updated Dockerfile.
If you followed the previous steps you should hopefully end up in a terminal inside the Docker VM Container. You'll prompt will look something like this:
root@3176dbf24add:~#
From here you can cd into the /app folder and test run any NodeJS or Python, like:
node index.jspython facemorpher/morpher.py --src=examples/face1.jpg --dest=examples/face2.jpg --num=12 --plotTo build Docker Image from Dockerfile:
docker build -t eduwass/face-the-internet-worker .
Content type
Image
Digest
sha256:cc9ca3511…
Size
855.8 MB
Last updated
over 10 years ago
docker pull eduwass/face-the-internet-worker