diff --git a/python/tflite_micro/pypi_build.sh b/python/tflite_micro/pypi_build.sh index 53e50ee2802..383da1b160b 100755 --- a/python/tflite_micro/pypi_build.sh +++ b/python/tflite_micro/pypi_build.sh @@ -63,6 +63,7 @@ IMAGE_ID=$(cat $IMAGE_ID_FILE) # Build the Python package within an ephemeral container. docker run \ + --init \ --rm \ --interactive \ --mount type=bind,source=$SRCDIR,destination=$SRCDIR \ diff --git a/python/tflite_micro/signal/BUILD b/python/tflite_micro/signal/BUILD index f8941ca2c1f..31759fce8b2 100644 --- a/python/tflite_micro/signal/BUILD +++ b/python/tflite_micro/signal/BUILD @@ -62,11 +62,6 @@ py_tflm_signal_library( ], ) -TARGET_COMPATIBLE_WITH = select({ - "@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"], - "//conditions:default": [], -}) - py_test( name = "delay_op_test", size = "small", @@ -76,7 +71,6 @@ py_test( "nomsan", "noubsan", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ ":delay_op", requirement("numpy"), @@ -108,7 +102,6 @@ py_test( "nomsan", "noubsan", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ ":energy_op", requirement("numpy"), @@ -140,7 +133,6 @@ py_test( "nomsan", "noubsan", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ ":fft_ops", requirement("numpy"), @@ -178,7 +170,6 @@ py_test( "nomsan", "noubsan", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ ":filter_bank_ops", requirement("numpy"), @@ -210,7 +201,6 @@ py_test( "nomsan", "noubsan", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ ":framer_op", requirement("numpy"), @@ -239,7 +229,6 @@ py_test( "nomsan", "noubsan", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ ":overlap_add_op", requirement("absl_py"), @@ -272,7 +261,6 @@ py_test( "nomsan", "noubsan", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ ":pcan_op", requirement("numpy"), @@ -304,7 +292,6 @@ py_test( "nomsan", "noubsan", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ ":stacker_op", requirement("numpy"), @@ -335,7 +322,6 @@ py_test( "nomsan", "noubsan", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ ":window_op", requirement("numpy"), diff --git a/python/tflite_micro/signal/utils/BUILD b/python/tflite_micro/signal/utils/BUILD index e436cd43c39..f16e7b37699 100644 --- a/python/tflite_micro/signal/utils/BUILD +++ b/python/tflite_micro/signal/utils/BUILD @@ -11,11 +11,6 @@ package( licenses = ["notice"], ) -TARGET_COMPATIBLE_WITH = select({ - "@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"], - "//conditions:default": [], -}) - py_test( name = "freq_to_mel_test", srcs = ["freq_to_mel_test.py"], @@ -27,7 +22,6 @@ py_test( "nomsan", "noubsan", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, ) py_library( @@ -79,6 +73,5 @@ py_test( "nomsan", "noubsan", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, visibility = ["//visibility:public"], ) diff --git a/signal/micro/kernels/BUILD b/signal/micro/kernels/BUILD index ffa4d625418..e4fa11ebfd0 100644 --- a/signal/micro/kernels/BUILD +++ b/signal/micro/kernels/BUILD @@ -72,17 +72,11 @@ cc_library( ], ) -TARGET_COMPATIBLE_WITH = select({ - "@bazel_tools//src/conditions:windows": ["@platforms//:incompatible"], - "//conditions:default": [], -}) - cc_test( name = "fft_test", srcs = [ "fft_test.cc", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ ":fft_flexbuffers_generated_data", ":register_signal_ops", @@ -110,7 +104,6 @@ cc_test( srcs = [ "window_test.cc", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ ":register_signal_ops", ":window_flexbuffers_generated_data", @@ -137,7 +130,6 @@ cc_test( srcs = [ "framer_test.cc", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ ":framer_flexbuffers_generated_data", ":register_signal_ops", @@ -164,7 +156,6 @@ cc_test( srcs = [ "overlap_add_test.cc", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ ":overlap_add_flexbuffers_generated_data", ":register_signal_ops", @@ -191,7 +182,6 @@ cc_test( srcs = [ "delay_test.cc", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ ":delay_flexbuffers_generated_data", "//tensorflow/lite/c:common", @@ -217,7 +207,6 @@ cc_test( srcs = [ "stacker_test.cc", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ ":register_signal_ops", ":stacker_flexbuffers_generated_data", @@ -244,7 +233,6 @@ cc_test( srcs = [ "energy_test.cc", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ ":energy_flexbuffers_generated_data", ":register_signal_ops", @@ -291,7 +279,6 @@ cc_test( srcs = [ "filter_bank_test.cc", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ ":filter_bank_flexbuffers_generated_data", "//tensorflow/lite/c:common", @@ -307,7 +294,6 @@ cc_test( srcs = [ "filter_bank_log_test.cc", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ ":filter_bank_log_flexbuffers_generated_data", "//tensorflow/lite/c:common", @@ -323,7 +309,6 @@ cc_test( srcs = [ "filter_bank_spectral_subtraction_test.cc", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ ":filter_bank_spectral_subtraction_flexbuffers_generated_data", "//tensorflow/lite/c:common", @@ -339,7 +324,6 @@ cc_test( srcs = [ "filter_bank_square_root_test.cc", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ "//tensorflow/lite/c:common", "//tensorflow/lite/micro:op_resolvers", @@ -364,7 +348,6 @@ cc_test( srcs = [ "pcan_test.cc", ], - target_compatible_with = TARGET_COMPATIBLE_WITH, deps = [ ":pcan_flexbuffers_generated_data", "//tensorflow/lite/c:common", diff --git a/tensorflow/lite/micro/tools/ci_build/docker_run_tflm.sh b/tensorflow/lite/micro/tools/ci_build/docker_run_tflm.sh index 2c4c401f67a..c996e2bce1d 100755 --- a/tensorflow/lite/micro/tools/ci_build/docker_run_tflm.sh +++ b/tensorflow/lite/micro/tools/ci_build/docker_run_tflm.sh @@ -37,5 +37,5 @@ shift echo "${TFLM_BOT_TOKEN}" | docker login ghcr.io -u tflm-bot --password-stdin # Note: DOCKER_RUN_ENV is used without quotes to allow multiple flags. -docker run ${DOCKER_RUN_ENV:-} --rm -v "$(pwd)":/opt/tflite-micro "${IMAGE}" \ +docker run ${DOCKER_RUN_ENV:-} --init --rm -v "$(pwd)":/opt/tflite-micro "${IMAGE}" \ /bin/bash -c "cd /opt && tflite-micro/$*"