Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker installation not working #276

Closed
eddiebarry opened this issue Nov 26, 2019 · 2 comments
Closed

docker installation not working #276

eddiebarry opened this issue Nov 26, 2019 · 2 comments
Assignees

Comments

@eddiebarry
Copy link

Tried to build the android app, but the instructions in the docker installation were raising errors

`ERROR: Analysis of target '//mediapipe/examples/android/src/java/com/google/mediapipe/apps/objectdetectiongpu:objectdetectiongpu' failed; build aborted: no such package '@local_config_git//': Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/4884d566396e9b67b62185751879ad14/external/org_tensorflow/third_party/git/git_configure.bzl", line 64
_fail(result.stderr)
File "/root/.cache/bazel/_bazel_root/4884d566396e9b67b62185751879ad14/external/org_tensorflow/third_party/git/git_configure.bzl", line 14, in _fail
fail(("%sGit Configuration Error:%s %...)))
Git Configuration Error: Traceback (most recent call last):
File "/root/.cache/bazel/_bazel_root/4884d566396e9b67b62185751879ad14/external/org_tensorflow/tensorflow/tools/git/gen_git_source.py", line 38, in
import six
ModuleNotFoundError: No module named 'six'

INFO: Elapsed time: 1.988s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages l
oaded, 0 targets configured)`

@jiuqiant
Copy link
Collaborator

Please make the following changes in the Dockerfile. With those changes, I can successfully build MediaPipe Android APKs in a docker container. We will push out those changes in the coming release.

--- a/Dockerfile
+++ b/Dockerfile
@@ -30,6 +30,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
         unzip \
         python \
         python-pip \
+        python3-pip \
         libopencv-core-dev \
         libopencv-highgui-dev \
         libopencv-imgproc-dev \
@@ -42,9 +43,10 @@ RUN apt-get update && apt-get install -y --no-install-recommends \

 RUN pip install --upgrade setuptools
 RUN pip install future
+RUN pip3 install six

 # Install bazel
-ARG BAZEL_VERSION=0.26.1
+ARG BAZEL_VERSION=1.1.0
 RUN mkdir /bazel && \
     wget --no-check-certificate -O /bazel/installer.sh 

Here is the command I run in the docker container to build one of the APKs.

root@d13456f98941:/mediapipe# bash ./setup_android_sdk_and_ndk.sh
root@d13456f98941:/mediapipe# bazel build -c opt --config=android_arm64 mediapipe/examples/android/src/java/com/google/mediapipe/apps/objectdetectiongpu:objectdetectiongpu

# It should print:
# INFO: From Executing genrule @com_github_glog_glog//:logging_h [for host]:
# select bazel-out/host/bin/external/com_github_glog_glog/src/glog/logging.h.tmp to be the glog logging.h file.
# INFO: From Executing genrule @com_github_glog_glog//:config_h [for host]:
# select bazel-out/host/bin/external/com_github_glog_glog/config.h.tmp to be the glog config file.
# Target //mediapipe/examples/android/src/java/com/google/mediapipe/apps/objectdetectiongpu:objectdetectiongpu up-to-date:
#   bazel-bin/mediapipe/examples/android/src/java/com/google/mediapipe/apps/objectdetectiongpu/objectdetectiongpu_deploy.jar
#   bazel-bin/mediapipe/examples/android/src/java/com/google/mediapipe/apps/objectdetectiongpu/objectdetectiongpu_unsigned.apk
#   bazel-bin/mediapipe/examples/android/src/java/com/google/mediapipe/apps/objectdetectiongpu/objectdetectiongpu.apk
# INFO: Elapsed time: 154.928s, Critical Path: 73.21s
# INFO: 2003 processes: 1 local, 1844 processwrapper-sandbox, 158 worker.
# INFO: Build completed successfully, 2072 total actions

@jiuqiant jiuqiant self-assigned this Nov 26, 2019
@eddiebarry
Copy link
Author

Thanks for the quick response. I love this framework more and more!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants