pydehon / mediapipe

Mediapipe 0.10.1 with CUDA GPU Support python libs
Apache License 2.0
6 stars 1 forks source link

Docker build on Windows env #1

Open ybott opened 10 months ago

ybott commented 10 months ago

Hi, I have also been watching the mediapipe PRs interested in updates to docker environments.

I tried building your solution with exactly what is specified in the README.md unfortunately I received the following:-

1.903 generating proto file: build/lib.linux-x86_64-cpython-310/mediapipe/util/tracking/motion_analysis_pb2.py
1.911 generating proto file: build/lib.linux-x86_64-cpython-310/mediapipe/util/tracking/tone_models_pb2.py
1.914 generating proto file: build/lib.linux-x86_64-cpython-310/mediapipe/util/tracking/box_tracker_pb2.py
1.919 generating proto file: build/lib.linux-x86_64-cpython-310/mediapipe/util/tracking/flow_packager_pb2.py
1.926 running generate_metadata_schema
 (specified in /opt/mediapipe/.bazelversion), but it wasn't found in /usr/bin.
1.950
1.950 You can install the required Bazel version via apt:
1.950   sudo apt update && sudo apt install bazel-6.1.1
1.950
1.950 If this doesn't work, check Bazel's installation instructions for help:
1.950   https://bazel.build/install/ubuntu
------
Dockerfile:47
--------------------
  46 |
  47 | >>> RUN cd /opt/mediapipe && \
  48 | >>>     export TF_CUDA_PATHS=/usr/local/cuda-11.8,/usr/include,/usr/include/x86_64-linux-gnu,/usr/lib/x86_64-linux-gnu,/usr/lib/nvidia-cuda-toolkit,/usr/lib/nvidia-cuda-toolkit/bin && \
  49 | >>>     python3 setup.py bdist_wheel
  50 |
--------------------
ERROR: failed to solve: process "/bin/sh -c cd /opt/mediapipe &&     export TF_CUDA_PATHS=/usr/local/cuda-11.8,/usr/include,/usr/include/x86_64-linux-gnu,/usr/lib/x86_64-linux-gnu,/usr/lib/nvidia-cuda-toolkit,/usr/lib/nvidia-cuda-toolkit/bin &&     python3 setup.py bdist_wheel" did not complete successfully: exit code: 255

I was wondering if you had tested in a Windows environment? I am able to get other GPU related docker images to build and run.

pydehon commented 10 months ago

Hello @ybott !

I didn't try out to build the docker file under windows, but it shouldn't change much if you're using WSL2!

It looks like it doesnt find bazel from the error you're getting, but it should be installed earlier. Did you tried to rebuild without cache?

mr-grixa commented 7 months ago

Hi, were you able to fix this error?

mr-grixa commented 7 months ago

Okay, I got it. You need to run everything from the linux wsl folders.

mr-grixa commented 7 months ago

I built the docker without errors. But python detectors still don't work. What did you test the gpu performance on?

pydehon commented 3 months ago

Unfortunately, some detector just wont work using gpu :/ maybe you will have better luck with the latest mediapipe implementation that is a bit more compliant for gpu use ;)