is a project where we spin up an Azure VM with a GPU to do face searching for Human Rights investigators. This source contains the Azure CLI build script, and Cloud init deployment script of the VM. source for the Python script that scans faces using the built VM above.

Wiki of how to use face_recognition

Installing on a GPU

We could use docker, and indeed there is a docker compose file in the face_recognition source. However it is quite out of date. digging into the libraries

As you can see from the build script it is quite involved to install, and getting the correct versions of the libraries working is tricky.

Only spinning up when needed / Performance

It is expensive keeping a GPU machine running all the time, so lets only spin one up when needed. contains an Azure CLI script to bring up a vm ready to go. However compiling from source takes time - about 12 minutes.

  • Create Azure resources (some in parallel with no-wait) - 1:28
  • Run bash build script on VM

Creating an Image

see next blog article

bash script

apt or apt-get go with the newer apt?


Impossible to initialize nvidia nvml : Driver/library version mismatch

This happened when I did an apt-get upgrade



GPU doing fine, with 2 instances of the single threaded app working using 2 of the CPU cores.

  • bpytop for CPU monitoring
  • nvtop for GPU monitoring
  • watch nvidia-ami for GPU monitoring too

Test Datasets - 2 in here

Copying files from GPU server to local

# windows to linux
scp 00248.png

# linux to windows
scp .

Or use WinSCP