The following step-by-step instructions will help you: (a) install and run Docker; (b) install the Plate Recognizer SDK; (c) test the Plate Recognizer SDK on a Windows PC.
Have questions? Check out our FAQ on SDK via Docker on Windows
Step 1. Before installation, you have to enable Hyper-V technology in your system. To do so, go to the Control Panel.
Step 2. Once in Control Panel, click in “Programs”.
Step 3. Select “Turn Windows feature on or off”.
Step 4. Check “Containers” and “Hyper-V”. If “Containers and “Hyper-V” are already checked, you can skip this step and go to Step 6 to start the Docker Installation.
Click “OK” to continue.
Step 5. Windows will ask you to restart the system. Click “Restart now” to do that.
Step 6. Now open your web browser and go to https://hub.docker.com
Click on “Sign up for Docker Hub”.
Step 7. Complete the registration process.
Step 8. Go to https://hub.docker.com. again and click on “Sign In”.
Step 9. Sign in with your Docker ID and password.
Step 10. Now, go to https://hub.docker.co,/editions/community/docker-ce-desktop-windows. Click on “Get Docker” to start downloading Docker.
Step 11. Once Docker is downloaded, execute it.
To start the installation process, please double click to execute the Docker Installer.
You will be prompted with this message: “Do you want to allow this app to make changes to your device?” Go ahead and click “Yes” to continue.
Step 12. Docker will start downloading additional packages. When it’s finished make sure “Add shortcut to desktop” is checked and click “OK” to continue.
Step 13. Docker will start unpacking files. Wait for this process to finish.
Step 14. Docker will show “Installation succeeded” at the end of the process. Click on “Close”.
Step 15. On the desktop, double-click on Docker icon to execute Docker Desktop.
Step 16. Docker will start and it will show you the Welcome window. Sign in with your docker account.
You have successfully installed Docker on your desktop!
Stuck? Check out our FAQ on SDK via Docker on Windows.
Step 17. Open up the Command Line in Windows by clicking on the Search Icon in the lower left of your monitor and typing “CMD” in the search bar.
Step 18. In the Command Line, type in the following command:
docker pull platerecognizer/alpr
Please note that you will need to sign up to get an API Key. To sign up, go to https://app.platerecognizer.com/accounts/signup and complete the process.
Docker will start pulling the image from our repository.
Step 19. Once logged in, go to https://app.platerecognizer.com/dashboard/ and copy the API Token.
Step 20. Go to the Command Line and type the following command:
docker run – -rm -t -p 8080:8080 -v license:/license -e TOKEN=YOUR_API_TOKEN -e LICENSE_KEY=MY_KEY platerecognizer/alpr
Please note that it is 2 dashes without a space in front of “rm”.
Get your API and License Key. Make sure to replace YOUR_API_TOKEN and MY_KEY with yours. You will get a message like this if everything works OK:
To verify that the container is running, type: docker ps
The result should look like this:
Step 21. In order to test that the SDK actually works please run the following command:
For Linux: curl -o /tmp/car.jpg https://platerecognizer.com/static/demo.jpg
For Windows: curl -o car.jpg https://platerecognizer.com/static/demo.jpg
This command gets a demo plate image.
Step 22: Test the SDK with the demo image.
For Linux: curl -F ‘[email protected]/tmp/car.jpg’ http://localhost:8080/alpr
For Windows: curl -F “[email protected]” http://localhost:8080/alpr
You should receive a JSON response with details like above.
If you need to move your installation to another machine, you need to first uninstall the current installation, since each license can only be used on a single machine.
Step 23. Stop running the containers using the image. Run the following command to get Container ID:
docker ps -q –filter ancestor=platerecognizer/alpr
Now we have the CONTAINER ID eb5a5faa25e5
Now run the following command to stop the container: docker stop CONTAINER_ID
Step 24. Run the container using the next command:
docker run –rm -t -v license:/license -e TOKEN=MY_TOKEN -e UNINSTALL=1 platerecognizer/alpr
(Make sure to replace MY_TOKEN with yours)
Step 25. You can remove the container now using docker rm command:
We can use the container ID we got from the first step and use it to remove it.
docker rm –f CONTAINER ID
Docked should respond with the CONTAINER ID like above.
You’re done! If you successfully installed, tested and/or uninstalled the SDK, then give yourself a pat on the back!
Let us know and we’d be happy to assist.
© 2021 Plate Recognizer, a subsidiary of ParkPow, Inc. All rights reserved.
Made with ❤ from Silicon Valley & Budapest.