Skip to main content

Docker Configuration

Start on Boot​

To run the docker container automatically on system startup, run it with the --restart always option. For a complete list of start options see Docker start on boot.

docker run \
--restart always \
-t \
-p 8001:8001 \
-v license:/license \
-e TOKEN=YYYYY \
-e LICENSE_KEY=XXXXX \
platerecognizer/container
danger

For the command above, make sure to change XXXXX to the License Key and YYYYY to your Plate Recognizer Token. Get your Token. Use On Premise Licenses.

Networking​

  • Add --network=host to use the host's networking directly.
  • You may use a different port if 8001 is already used. For example, to use port 8888 do -p 8888:8001.
  • Add --detach to run container in background.

Are you experiencing connection errors (Failed to establish a new connection)?​

After a resume from sleep or on an unstable network (lots of disconnections), the overlay network may stop working. Restarting Docker Desktop or the Docker daemon will fix this issue. Another solution is to switch to host networking (see above).

Speed Optimization​

  • By default the SDK starts a single worker process. To fully use the machine's compute, you can enable multiple workers. For example, adding -e WORKERS=2 to docker run will start 2 worker processes.
    • When this is enabled, it is preferred to call the API in a multi-threaded fashion.
    • When ContainerID is processing a request, 15-20% of the work is done on a single core and the rest is using all the cores. On a device with 2 cores or less changing WORKERS will not make much difference. It can be interesting to play with that knob when the device has 4-8 cores.
  • When using a compressed image format like JPEG or PNG, the SDK will need to decode the image before processing it. To skip the decoding step, prefer an uncompressed format like BMP, PPM, PNM or SGI.
Floating button icon
CTRL + .