google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://ai.google.dev/edge/mediapipe
Apache License 2.0
27.06k stars 5.11k forks source link

Building Docker Image with Docker file and building auto flip model fails #4572

Closed alimirjahani7 closed 1 year ago

alimirjahani7 commented 1 year ago

OS Platform and Distribution

Docker on Ubuntu 22.04

Compiler version

Latest Docker

Programming Language and version

Latest Docker

Installed using virtualenv? pip? Conda?(if python)

No response

MediaPipe version

Latest Docker

Bazel version

Latest Docker

XCode and Tulsi versions (if iOS)

No response

Android SDK and NDK versions (if android)

No response

Android AAR (if android)

None

OpenCV version (if running on desktop)

No response

Describe the problem

building Docker image from Docker file in the project with adding command below will fail
bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 \
  mediapipe/examples/desktop/autoflip:run_autoflip

Complete Logs

#0 1025.2 [1,140 / 1,814] [Sched] Compiling mediapipe/calculators/tflite/ssd_anchors_calculator.pb.cc [for tool]; 183s ... (128 actions, 3 running)
#0 1026.6 [1,141 / 1,814] [Sched] Compiling mediapipe/calculators/tflite/ssd_anchors_calculator.pb.cc [for tool]; 185s ... (128 actions, 2 running)
#0 1029.1 [1,141 / 1,814] [Sched] Compiling mediapipe/calculators/image/image_transformation_calculator.pb.cc [for tool]; 187s ... (128 actions, 3 running)
#0 1030.6 [1,143 / 1,814] [Sched] Compiling mediapipe/calculators/tflite/tflite_converter_calculator.pb.cc [for tool]; 189s ... (128 actions, 2 running)
#0 1032.1 [1,144 / 1,814] [Sched] Compiling mediapipe/calculators/video/opencv_video_encoder_calculator.pb.cc [for tool]; 190s ... (128 actions, 3 running)
#0 1033.2 [1,145 / 1,814] [Sched] Compiling mediapipe/calculators/util/detections_to_render_data_calculator.pb.cc [for tool]; 191s ... (128 actions, 3 running)
#0 1034.6 [1,147 / 1,814] [Sched] Compiling mediapipe/calculators/core/concatenate_vector_calculator.pb.cc [for tool]; 192s ... (128 actions, 2 running)
#0 1035.6 [1,148 / 1,814] [Sched] Compiling mediapipe/calculators/util/annotation_overlay_calculator.pb.cc [for tool]; 193s ... (128 actions, 2 running)
#0 1036.6 [1,149 / 1,814] [Sched] Compiling mediapipe/calculators/util/non_max_suppression_calculator.pb.cc [for tool]; 194s ... (128 actions, 2 running)
#0 1038.1 [1,150 / 1,814] [Sched] Compiling mediapipe/framework/tool/packet_generator_wrapper_calculator.pb.cc [for tool]; 196s ... (128 actions, 3 running)
#0 1039.6 [1,152 / 1,814] [Sched] Compiling mediapipe/framework/tool/options_registry.cc; 197s ... (128 actions, 2 running)
#0 1041.3 [1,152 / 1,814] [Sched] Compiling mediapipe/framework/tool/proto_util_lite.cc; 199s ... (128 actions, 3 running)
#0 1042.6 [1,154 / 1,814] [Sched] Compiling tensorflow/lite/core/kernels/register.cc; 200s ... (128 actions, 2 running)
#0 1046.7 [1,154 / 1,814] [Sched] Compiling tensorflow/lite/kernels/activations.cc; 204s ... (128 actions, 3 running)
#0 1048.6 [1,156 / 1,814] [Sched] Compiling tensorflow/lite/kernels/basic_rnn.cc; 206s ... (128 actions, 2 running)
#0 1053.3 [1,156 / 1,814] [Sched] Compiling tensorflow/lite/kernels/while.cc; 210s ... (128 actions, 3 running)
#0 1054.6 [1,158 / 1,814] [Sched] Compiling tensorflow/lite/kernels/concatenation.cc; 210s ... (128 actions, 2 running)
#0 1056.6 [1,159 / 1,814] [Sched] Compiling tensorflow/lite/kernels/transpose_conv.cc; 212s ... (128 actions, 2 running)
#0 1061.7 [1,159 / 1,814] [Sched] Compiling tensorflow/lite/kernels/svdf.cc; 216s ... (128 actions, 3 running)
#0 1063.6 [1,160 / 1,814] [Sched] Compiling tensorflow/lite/kernels/svdf.cc; 218s ... (128 actions, 2 running)
#0 1065.4 [1,160 / 1,814] [Sched] Compiling tensorflow/lite/kernels/sub.cc; 214s ... (128 actions, 3 running)
#0 1066.6 [1,161 / 1,814] [Sched] Compiling tensorflow/lite/kernels/sub.cc; 215s ... (128 actions, 2 running)
#0 1068.1 [1,161 / 1,814] [Sched] Compiling tensorflow/lite/kernels/strided_slice.cc; 213s ... (128 actions, 3 running)
#0 1069.6 [1,162 / 1,814] [Sched] Compiling tensorflow/lite/kernels/strided_slice.cc; 215s ... (128 actions, 2 running)
#0 1078.1 [1,162 / 1,814] [Sched] Compiling tensorflow/lite/kernels/split_v.cc; 222s ... (128 actions, 3 running)
#0 1079.6 [1,163 / 1,814] [Sched] Compiling tensorflow/lite/kernels/split_v.cc; 224s ... (128 actions, 2 running)
#0 1080.6 [1,164 / 1,814] [Sched] Compiling tensorflow/lite/kernels/squared_difference.cc; 223s ... (128 actions, 2 running)
#0 1081.6 [1,165 / 1,814] [Sched] Compiling tensorflow/lite/kernels/space_to_depth.cc; 219s ... (128 actions, 2 running)
#0 1089.0 [1,165 / 1,814] [Sched] Compiling tensorflow/lite/kernels/batch_to_space_nd.cc; 226s ... (128 actions, 3 running)
#0 1090.6 [1,167 / 1,814] [Sched] Compiling tensorflow/lite/kernels/space_to_batch_nd.cc; 222s ... (128 actions, 2 running)
#0 1096.7 [1,167 / 1,814] [Sched] Compiling tensorflow/lite/kernels/slice.cc; 228s ... (128 actions, 3 running)
#0 1098.6 [1,169 / 1,814] [Sched] Compiling tensorflow/lite/kernels/shape.cc; 230s ... (128 actions, 2 running)
#0 1104.7 [1,169 / 1,814] [Sched] Compiling tensorflow/lite/kernels/sign.cc; 236s ... (128 actions, 3 running)
#0 1106.3 [1,171 / 1,814] [Sched] Compiling tensorflow/lite/kernels/round.cc; 238s ... (128 actions, 3 running)
#0 1107.6 [1,173 / 1,814] [Sched] Compiling tensorflow/lite/kernels/right_shift.cc; 239s ... (128 actions, 2 running)
#0 1113.5 [1,173 / 1,814] [Sched] Compiling tensorflow/lite/kernels/resize_nearest_neighbor.cc; 245s ... (128 actions, 3 running)
#0 1114.6 [1,175 / 1,814] [Sched] Compiling tensorflow/lite/kernels/reverse.cc; 246s ... (128 actions, 2 running)
#0 1115.6 [1,176 / 1,814] [Sched] Compiling tensorflow/lite/kernels/reduce.cc; 247s ... (128 actions, 2 running)
#0 1117.6 [1,176 / 1,814] [Sched] Compiling tensorflow/lite/kernels/rank.cc; 249s ... (128 actions, 3 running)
#0 1118.6 [1,177 / 1,814] [Sched] Compiling tensorflow/lite/kernels/rank.cc; 250s ... (128 actions, 2 running)
#0 1121.6 [1,177 / 1,814] [Sched] Compiling tensorflow/lite/kernels/select.cc; 253s ... (128 actions, 3 running)
#0 1122.6 [1,179 / 1,814] [Sched] Compiling tensorflow/lite/kernels/pooling.cc; 252s ... (128 actions, 2 running)
#0 1125.9 [1,179 / 1,814] [Sched] Compiling tensorflow/lite/kernels/pow.cc; 256s ... (128 actions, 3 running)
#0 1127.6 [1,180 / 1,814] [Sched] Compiling tensorflow/lite/kernels/pow.cc; 257s ... (128 actions, 2 running)
#0 1134.8 [1,180 / 1,814] [Sched] Compiling tensorflow/lite/kernels/one_hot.cc; 264s ... (128 actions, 3 running)
#0 1136.3 [1,181 / 1,814] [Sched] Compiling tensorflow/lite/kernels/numeric_verify.cc; 263s ... (128 actions, 3 running)
#0 1137.6 [1,182 / 1,814] [Sched] Compiling tensorflow/lite/kernels/numeric_verify.cc; 264s ... (128 actions, 2 running)
#0 1139.6 [1,183 / 1,814] [Sched] Compiling tensorflow/lite/kernels/neg.cc; 265s ... (128 actions, 2 running)
#0 1143.4 [1,183 / 1,814] [Sched] Compiling tensorflow/lite/kernels/mul.cc; 267s ... (128 actions, 3 running)
#0 1144.6 [1,184 / 1,814] [Sched] Compiling tensorflow/lite/kernels/mul.cc; 268s ... (128 actions, 2 running)
#0 1146.3 [1,184 / 1,814] [Sched] Compiling tensorflow/lite/kernels/matrix_set_diag.cc; 269s ... (128 actions, 3 running)
#0 1147.7 [1,185 / 1,814] [Sched] Compiling tensorflow/lite/kernels/matrix_set_diag.cc; 270s ... (128 actions, 2 running)
#0 1150.5 [1,185 / 1,814] [Sched] Compiling tensorflow/lite/kernels/ceil.cc; 272s ... (128 actions, 3 running)
#0 1151.7 [1,186 / 1,814] [Sched] Compiling tensorflow/lite/kernels/ceil.cc; 273s ... (128 actions, 2 running)
#0 1157.5 [1,186 / 1,814] [Sched] Compiling tensorflow/lite/kernels/maximum_minimum.cc; 278s ... (128 actions, 3 running)
#0 1158.7 [1,188 / 1,814] [Sched] Compiling tensorflow/lite/kernels/quantize.cc; 276s ... (128 actions, 2 running)
#0 1165.0 [1,188 / 1,814] [Sched] Compiling tensorflow/lite/kernels/logical.cc; 282s ... (128 actions, 3 running)
#0 1166.7 [1,189 / 1,814] [Sched] Compiling tensorflow/lite/kernels/logical.cc; 284s ... (128 actions, 2 running)
#0 1168.7 [1,190 / 1,814] [Sched] Compiling tensorflow/lite/kernels/expand_dims.cc; 285s ... (128 actions, 2 running)
#0 1169.8 [1,190 / 1,814] [Sched] Compiling tensorflow/lite/kernels/local_response_norm.cc; 286s ... (128 actions, 3 running)
#0 1171.7 [1,191 / 1,814] [Sched] Compiling tensorflow/lite/kernels/local_response_norm.cc; 287s ... (128 actions, 2 running)
#0 1173.7 [1,192 / 1,814] [Sched] Compiling tensorflow/lite/kernels/if.cc; 285s ... (128 actions, 2 running)
#0 1175.1 [1,192 / 1,814] [Sched] Compiling tensorflow/lite/kernels/transpose.cc; 286s ... (128 actions, 3 running)
#0 1176.1 [1,193 / 1,814] [Sched] Compiling tensorflow/lite/kernels/unpack.cc; 285s ... (128 actions, 3 running)
#0 1177.7 [1,194 / 1,814] [Sched] Compiling tensorflow/lite/kernels/unpack.cc; 287s ... (128 actions, 2 running)
#0 1179.4 [1,194 / 1,814] [Sched] Compiling tensorflow/lite/kernels/hashtable.cc; 287s ... (128 actions, 3 running)
#0 1180.7 [1,195 / 1,814] [Sched] Compiling tensorflow/lite/kernels/hashtable.cc; 288s ... (128 actions, 2 running)
#0 1182.4 [1,195 / 1,814] [Sched] Compiling tensorflow/lite/kernels/hashtable_find.cc; 290s ... (128 actions, 3 running)
#0 1183.5 [1,196 / 1,814] [Sched] Compiling tensorflow/lite/kernels/fully_connected.cc; 289s ... (128 actions, 3 running)
#0 1184.7 [1,198 / 1,814] [Sched] Compiling tensorflow/lite/kernels/fill.cc; 288s ... (128 actions, 3 running)
#0 1185.7 [1,199 / 1,814] [Sched] Compiling tensorflow/lite/kernels/fill.cc; 289s ... (128 actions, 2 running)
#0 1187.4 [1,199 / 1,814] [Sched] Compiling tensorflow/lite/kernels/floor_div.cc; 290s ... (128 actions, 3 running)
#0 1188.7 [1,200 / 1,814] [Sched] Compiling tensorflow/lite/kernels/floor_div.cc; 291s ... (128 actions, 2 running)
#0 1189.7 [1,200 / 1,814] [Sched] Compiling tensorflow/lite/kernels/elementwise.cc; 292s ... (128 actions, 3 running)
#0 1191.7 [1,201 / 1,814] [Sched] Compiling tensorflow/lite/kernels/elementwise.cc; 294s ... (128 actions, 2 running)
#0 1193.7 [1,202 / 1,814] [Sched] Compiling tensorflow/lite/kernels/div.cc; 294s ... (128 actions, 2 running)
#0 1195.7 [1,202 / 1,814] [Sched] Compiling tensorflow/lite/kernels/bidirectional_sequence_lstm.cc; 295s ... (128 actions, 3 running)
#0 1196.7 [1,203 / 1,814] [Sched] Compiling tensorflow/lite/kernels/bidirectional_sequence_lstm.cc; 296s ... (128 actions, 2 running)
#0 1204.3 [1,203 / 1,814] [Sched] Compiling tensorflow/lite/kernels/add.cc; 303s ... (128 actions, 3 running)
#0 1205.7 [1,204 / 1,814] [Sched] Compiling tensorflow/lite/kernels/add.cc; 304s ... (128 actions, 2 running)
#0 1207.6 [1,204 / 1,814] [Sched] Compiling tensorflow/lite/kernels/atan2.cc; 302s ... (128 actions, 3 running)
#0 1208.8 [1,205 / 1,814] [Sched] Compiling tensorflow/lite/kernels/atan2.cc; 304s ... (128 actions, 2 running)
#0 1209.8 [1,205 / 1,814] [Sched] Compiling tensorflow/lite/kernels/unidirectional_sequence_rnn.cc; 305s ... (128 actions, 3 running)
#0 1210.8 [1,207 / 1,814] [Sched] Compiling tensorflow/lite/kernels/bidirectional_sequence_rnn.cc; 305s ... (128 actions, 2 running)
#0 1212.7 [1,208 / 1,814] [Sched] Compiling tensorflow/lite/kernels/conv3d.cc; 302s ... (128 actions, 3 running)
#0 1213.8 [1,209 / 1,814] [Sched] Compiling tensorflow/lite/kernels/conv3d.cc; 304s ... (128 actions, 2 running)
#0 1220.2 [1,209 / 1,814] [Sched] Compiling tensorflow/lite/kernels/complex_support.cc; 309s ... (128 actions, 3 running)
#0 1221.8 [1,210 / 1,814] [Sched] Compiling tensorflow/lite/kernels/complex_support.cc; 311s ... (128 actions, 2 running)
#0 1224.2 [1,210 / 1,814] [Sched] Compiling tensorflow/lite/kernels/conv.cc; 313s ... (128 actions, 3 running)
#0 1225.2 [1,211 / 1,814] [Sched] Compiling tensorflow/lite/kernels/audio_spectrogram.cc; 312s ... (128 actions, 3 running)
#0 1226.8 [1,212 / 1,814] [Sched] Compiling tensorflow/lite/kernels/audio_spectrogram.cc; 314s ... (128 actions, 2 running)
#0 1230.8 [1,212 / 1,814] [Sched] Compiling tensorflow/lite/kernels/unique.cc; 318s ... (128 actions, 3 running)
#0 1232.8 [1,213 / 1,814] [Sched] Compiling tensorflow/lite/kernels/unique.cc; 320s ... (128 actions, 2 running)
#0 1238.7 [1,213 / 1,814] [Sched] Compiling tensorflow/lite/kernels/hashtable_size.cc; 324s ... (128 actions, 3 running)
#0 1239.8 [1,214 / 1,814] [Sched] Compiling tensorflow/lite/kernels/hashtable_size.cc; 325s ... (128 actions, 2 running)
#0 1242.8 [1,214 / 1,814] [Sched] Compiling tensorflow/lite/kernels/conv3d_transpose.cc; 328s ... (128 actions, 3 running)
#0 1243.9 [1,215 / 1,814] [Sched] Compiling tensorflow/lite/kernels/hashtable_lookup.cc; 326s ... (128 actions, 3 running)
#0 1245.8 [1,216 / 1,814] [Sched] Compiling tensorflow/lite/kernels/hashtable_lookup.cc; 328s ... (128 actions, 2 running)
#0 1253.2 [1,216 / 1,814] [Sched] Compiling tensorflow/lite/kernels/assign_variable.cc; 335s ... (128 actions, 3 running)
#0 1254.5 [1,218 / 1,814] [Sched] Compiling tensorflow/lite/core/interpreter_builder.cc; 335s ... (128 actions, 3 running)
#0 1256.2 [1,219 / 1,814] [Sched] Compiling tensorflow/lite/core/interpreter_builder.cc; 336s ... (128 actions, 2 running)
#0 1262.8 [1,219 / 1,814] [Sched] Compiling mediapipe/framework/formats/location.cc; 342s ... (128 actions, 3 running)
#0 1264.2 [1,220 / 1,814] [Sched] Compiling mediapipe/framework/formats/location.cc; 343s ... (128 actions, 2 running)
#0 1265.5 [1,220 / 1,814] [Sched] Compiling mediapipe/framework/calculator_options.pb.cc [for tool]; 340s ... (128 actions, 3 running)
#0 1267.2 [1,221 / 1,814] [Sched] Compiling mediapipe/framework/calculator_options.pb.cc [for tool]; 342s ... (128 actions, 2 running)
#0 1268.5 [1,221 / 1,814] [Sched] Compiling mediapipe/examples/desktop/autoflip/quality/polynomial_regression_path_solver.cc; 342s ... (128 actions, 3 running)
#0 1270.1 [1,222 / 1,814] [Sched] Compiling mediapipe/examples/desktop/autoflip/quality/visual_scorer.cc; 342s ... (128 actions, 3 running)
#0 1271.1 [1,224 / 1,814] [Sched] Compiling mediapipe/framework/deps/proto_descriptor.pb.cc; 339s ... (127 actions, 3 running)
#0 1271.2 When you use --proto, that you should check for conformity yourself, using the existing --conform
#0 1271.2 ERROR: /mediapipe/mediapipe/examples/desktop/autoflip/quality/BUILD:129:11: Compiling mediapipe/examples/desktop/autoflip/quality/polynomial_regression_path_solver.cc failed: (Exit 1): gcc failed: error executing command (from target //mediapipe/examples/desktop/autoflip/quality:polynomial_regression_path_solver) /usr/bin/gcc -U_FORTIFY_SOURCE -fstack-protector -Wall -Wunused-but-set-parameter -Wno-free-nonheap-object -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG -ffunction-sections ... (remaining 93 arguments skipped)
#0 1271.2 
#0 1271.2 Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
#0 1271.2 In file included from ./mediapipe/examples/desktop/autoflip/quality/polynomial_regression_path_solver.h:20,
#0 1271.2                  from mediapipe/examples/desktop/autoflip/quality/polynomial_regression_path_solver.cc:15:
#0 1271.2 ./mediapipe/framework/port/opencv_core_inc.h:18:10: fatal error: opencv2/core/version.hpp: No such file or directory
#0 1271.2  #include <opencv2/core/version.hpp>
#0 1271.2           ^~~~~~~~~~~~~~~~~~~~~~~~~~
#0 1271.2 compilation terminated.
#0 1271.9 Target //mediapipe/examples/desktop/autoflip:run_autoflip failed to build
#0 1271.9 Use --verbose_failures to see the command lines of failed build steps.
#0 1272.2 [1,351 / 1,814] checking cached actions
#0 1272.5 INFO: Elapsed time: 1271.567s, Critical Path: 910.33s
#0 1272.5 INFO: 1351 processes: 405 internal, 946 processwrapper-sandbox.
#0 1272.5 FAILED: Build did NOT complete successfully
------
Dockerfile:77
--------------------
  75 |     # If we want the docker image to contain the pre-built object_detection_offline_demo binary, do the following
  76 |     # RUN bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/demo:object_detection_tensorflow_demo
  77 | >>> RUN bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/autoflip:run_autoflip
  78 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/autoflip:run_autoflip" did not complete successfully: exit code: 1
kuaashish commented 1 year ago

Hello @alimirjahani7,

We have ended support for the Autoflip and upgrading to these legacy solutions or Already have been upgraded. However, the libraries, documentation, and source code for all the MediaPipe Legacy Solutions or the support we have ended will continue to be available in our GitHub repository and through library distribution services, such as Maven and NPM.

You can continue to use those legacy solutions in your applications if you choose. Thank you!

alimirjahani7 commented 1 year ago

Hi Thanks for your help So are there any documents on how to use them using npm? I used the library and only found the current docker file and bazel installation

kuaashish commented 1 year ago

@alimirjahani7,

We did not have the implementation in Web, Only supported platform is framework, Using the docker as well. This documentation will give the better understanding to build in the framework. However, We are ended support on it. Thank you

alimirjahani7 commented 1 year ago

Sorry I didn't understand correctly Does the dockerfile in the github repo that I added bazel command have any support??

kuaashish commented 1 year ago

@alimirjahani7,

We have completely ended support of the Autoflip solution. If building through docker failing, You can choose to build through framework as guided here. However, You need to install mediapipe as steps included here, Then you need to follow the command mentioned in the first hyperlink, Or You can follow the below:

bazel build -c opt --define MEDIAPIPE_DISABLE_GPU=1 mediapipe/examples/desktop/autoflip:run_autoflip Thank you!

github-actions[bot] commented 1 year ago

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

github-actions[bot] commented 1 year ago

This issue was closed due to lack of activity after being marked stale for past 7 days.

google-ml-butler[bot] commented 1 year ago

Are you satisfied with the resolution of your issue? Yes No