-
Scenario: Windows 10 machine, Docker Desktop 4.19.0, WSL installed and configured.
Edit: I should state that I barely know what I am doing here, I am like a monkey pressing keys and hoping that something will come out working at the end. Trying to use the custom build SubCenter-ArcFace-r100-gpu: Installed Nvidia GPU: NVIDIA GeForce GTX 650 Ti BOOST Now, it seems that I have to install the "nvidia runtime" in docker, spent days looking for info on how to do this using Docker on Windows+WSL, all the info I can find is about using Linux as the base OS and not Windows. Every single thing I find about installing the nvidia runtime on Windows seems outdated, does not work, or is not clear enough. Somehow it seems I have to install Ubuntu under WSL, run Ubuntu, install Docker inside Ubuntu, install the nvidia runtime in docker running on Ubuntu, that is running on WSL, that is integrated into Docker Desktop running on Windows. How does this work? No idea, Followed lots of blog posts, nvidia docs, cannot understand how this inception like mess ends up with the nvidia runtime installed and configured on the top level Docker Desktop on Windows, gave up with that route. Then came across https://hub.docker.com/r/nvidia/cuda Is this the nvidia runtime that I have to install? No idea, let's try. Oh I have to specify a tag for it. Lets go with this: docker pull nvidia/cuda:11.4.0-runtime OK, I got something: How do I test if this is working? (insert half a day of research and 200 open tabs in Chrome) Lets create a docker-compose.yml file with this inside: Now lets do Nice? Are we done? Is that all? No idea. Now lets try to set up SubCenter-ArcFace-r100-gpu: Seems logical, how will it know that the image nvidia/cuda is the one with the nvidia runtime. Cue another half a day of research: It seems I have to somehow edit daemon.json and add the info of where the nvidia runtime is located? Where is this daemon,json file located on Docker Desktop Windows? Success! found it at C:\Users\username.docker\daemon.json Now all the examples I can find seem to be using Linux as the main OS, could not find one example of doing this using Windows 10 Seems I can edit this file from inside Docker Desktop? Too scared to proceed: "This can prevent Docker from starting" Even if I wanted to, I have no idea what to add to it, found some info, for example:
How does that translate to my scenario? No idea. Sidequests: Found some info about replacing "runtime=nvidia" with "--gpus all" No idea how I can use that. Then found this, seems interesting: https://docs.docker.com/compose/gpu-support/ Lets do some experiments then, edit SubCenter-ArcFace-r100-gpu\docker-compose.yml: remove the
Save, try Well, is it working?, at least it creates the container and images, and they seem to be up and running: Lets set up a detection service and try it out: compreface-core log:
Well, I guess it does not work. Why? Is it that the GPU I managed to get my hands on is too old? Is it that everything I did makes no sense at all? No idea. I would love to test with a GeForce 3060, but cannot justify spending USD 500 on a video card just to see if I can make this work. I guess I will stick with 9 second detection times until I can get some help figuring this out. |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 3 replies
-
My main question is: Is there anyone out there that managed to make this work under Windows 10 + Docker Desktop + WSL2? If you are out there, could you share the steps and incantations required to install a working copy of the nvidia runtime? |
Beta Was this translation helpful? Give feedback.
-
More anecdotal info: I have 150000 640x480 images with (generally) one face on it, from an attendance system I developed using android tablets, that have been in use now for a couple of years. Right now there is no automated recognition of subjects, just the stored images. There are 250 employees in total, what I am doing right now is processing the 150k images to extract the 5 best ones for each subject to use as samples to upload for each subject and then be able to do recognition. At 9 seconds on average per image, I have been doing this for about a week now, and still not done. This is my quick and dirty form for doing this: I calculate the face box area, the distance of the center of the box from the center of the image, and with box_probability will use those parameters to select the 5 best images for each subject, for example: |
Beta Was this translation helpful? Give feedback.
-
I don't have a clear answer on how to install CompreFace with GPU for Windows. |
Beta Was this translation helpful? Give feedback.
-
First of all, thank you for replying. I solved my problem, I am using now the compreface-core:1.1.0-arcface-r100 build, no GPU required. The reason for the 10 seconds detection, was simply that I was using I made a request with limit=0, and then I realized that the API was detecting about 6k faces in each picture, so basically that was the reason for the 10 second detection times. Now I am using a sane value of I use limit 2 to find out what pictures cannot be used as samples. Everything is working fine for now, I processed all 150k images thru detection, wrote some code to select the best 5 to use as samples for each subject, uploaded the samples, and I am happy to say that the recognition rate for proper pictures is 100% accurate. For recognition I am using Each recognition takes about 3.5 seconds With these results I just mentioned, there is no point for me to invest in a video card to get more performance and accuracy, these numbers are good enough for me. TLDR for the using GPU/CUDA on Docker Desktop on Windows, I still have to find one acount in the internet of someone that managed to pull that out succesfully. |
Beta Was this translation helpful? Give feedback.
-
Thank you so much! |
Beta Was this translation helpful? Give feedback.
-
Update: I bought an RTX 3060 12GB, did everything as explained, still it does not work.
EDIT: I think I managed to make it work, will post solution after checking that everything works. |
Beta Was this translation helpful? Give feedback.
-
Well, it works, the xtimer column is the time it takes to do recognition of a face using SubCenter-ArcFace-r100, around 5 seconds: And using SubCenter-ArcFace-r100-gpu with RTX 3060 12GB: All I did was install the video card drivers, and then edited the docker-compose.yml file like this:
Removed the nvidia runtime line and added the deploy:.... part See https://docs.docker.com/compose/gpu-support/ It was a very simple solution after all. |
Beta Was this translation helpful? Give feedback.
-
The file I edited is "CompreFace_1.1.0\custom-builds\SubCenter-ArcFace-r100-gpu\docker-compose.yml" |
Beta Was this translation helpful? Give feedback.
Well, it works, the xtimer column is the time it takes to do recognition of a face using SubCenter-ArcFace-r100, around 5 seconds:
And using SubCenter-ArcFace-r100-gpu with RTX 3060 12GB:
All I did was install the video card drivers, and then edited the docker-compose.yml file like this: