Skip to content
Junrou Nishida edited this page Jan 6, 2022 · 5 revisions

Build/Installation

Is there any negative impact on performance by using Docker?

Docker is only used to build native libraries, not at runtime, so there is no impact on performance.
It is possible that the build time will increase (especially when the host OS is Windows), but unless you are building libraries repeatedly, it should be much less stressful than installing all the dependent tools manually.

How much CPU and memory should be allocated to a Docker container?

You don't need to mind this issue if your host OS is Linux, but on Windows, you need to specify --cpus and --memory option when starting a container.

According to my rule of thumb, it is better to adjust the parameters as follows (this doesn't apply if you have too little memory):

  1. When starting Windows container, allocate more than 1.2g * [cpus] memory.

    docker run --cpus=8 --memory=10g -it mediapipe_unity:windows
  2. But if you'd like to build libraries for Android on Windows container, allocate more than 1.5g * [cpus] memory.

    docker run --cpus=8 --memory=12g -it mediapipe_unity:windows
  3. On the other hand, when starting Linux container, allocate more than 1g * [cpus] memory.

    docker run --cpus=8 --memory=8g -it mediapipe_unity:linux

How to reduce the plugin size?

Strip symbols from native libraries. See Build Command for more details.

Development

InternalException: INTERNAL: ; eglMakeCurrent() returned error 0x3000

If you encounter an error like below and you use OpenGL Core as the Unity's graphics APIs, please try Vulkan.

InternalException: INTERNAL: ; eglMakeCurrent() returned error 0x3000_mediapipe/mediapipe/gpu/gl_context_egl.cc:261)
Clone this wiki locally