Run face_recognition on GPU easily with Docker.
To run on GPU you need a computer with a CUDA-capable GPU and the NVIDIA driver >= 418.39 (because it uses CUDA 10.1; see the CUDA Toolkit and Compatible Driver Versions table for more information). Otherwise, you can run on the CPU.
You also need a camera connected to the computer. Otherwise, you can run other scripts within the container.
- Install Docker.
- Install the NVIDIA Container Toolkit.
- Run:
host +local:root
docker run \
--rm \
--gpus all \
-v /tmp/.X11-unix:/tmp/.X11-unix:rw \
-e QT_X11_NO_MITSHM=1 \
-e DISPLAY \
--device=/dev/video0:/dev/video0 \
bryant1410/face_recognition \
python3 facerec_from_webcam_faster.py