Skip to content

Commit

Permalink
Fixed docker build script
Browse files Browse the repository at this point in the history
  • Loading branch information
emgucv committed Sep 10, 2024
1 parent 6535d60 commit 1ed603c
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 22 deletions.
14 changes: 10 additions & 4 deletions platforms/ubuntu/docker/docker_build_emgutf
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,19 @@ cd "$(dirname "$0")"

cd ../../..

USER_ID=$(id -u)
USER_NAME=$(whoami)

echo "USER_ID=$USER_ID"
echo "USER_NAME=$USER_NAME"

docker run \
-e USER="$(id -u)" \
-u="$(id -u)" \
-e USER="$USER_ID" \
-u="$USER_ID" \
-v $(pwd):/src/workspace \
-v /etc/passwd:/etc/passwd \
-w /src/workspace/platforms/ubuntu/22.04 \
emgu/bazel-android:dotnet-6.0-bazel-5.0.0-ubuntu-22.04 \
-w /src/workspace/platforms/ubuntu/24.04 \
emgu/bazel-android:ubuntu-24.04-dotnet-8-bazelisk \
./build_emgutf


22 changes: 16 additions & 6 deletions platforms/ubuntu/docker/docker_build_tf
Original file line number Diff line number Diff line change
@@ -1,17 +1,27 @@
#!/bin/bash
#!/bin/bash -v

cd "$(dirname "$0")"

mkdir -p /tmp/build_output

cd ../../..

USER_ID=$(id -u)
USER_NAME=$(whoami)

echo "USER_ID=$USER_ID"
echo "USER_NAME=$USER_NAME"

docker run \
-e USER="$(id -u)" \
-u="$(id -u)" \
-e USER="$USER_ID" \
-u="$USER_ID" \
-v $(pwd):/src/workspace \
-v /home/$USER_NAME/.cache/bazelisk:/home/$USER_NAME/.cache/bazelisk \
-v /tmp/build_output:/tmp/build_output \
-v /etc/passwd:/etc/passwd \
-w /src/workspace/platforms/ubuntu/22.04 \
emgu/bazel-android:dotnet-6.0-bazel-5.0.0-ubuntu-22.04 \
./bazel_build_tf
-w /src/workspace/platforms/ubuntu/24.04 \
emgu/bazel-android:ubuntu-24.04-dotnet-8-bazelisk \
bash -c "./bazel_build_tf"



13 changes: 10 additions & 3 deletions platforms/ubuntu/docker/docker_build_tf_android
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,20 @@ mkdir -p /tmp/build_output

cd ../../..

USER_ID=$(id -u)
USER_NAME=$(whoami)

echo "USER_ID=$USER_ID"
echo "USER_NAME=$USER_NAME"

docker run \
-e USER="$(id -u)" \
-u="$(id -u)" \
-e USER="$USER_ID" \
-u="$USER_ID" \
-v $(pwd):/src/workspace \
-v /home/$USER_NAME/.cache/bazelisk:/home/$USER_NAME/.cache/bazelisk \
-v /tmp/build_output:/tmp/build_output \
-v /etc/passwd:/etc/passwd \
-w /src/workspace/platforms/android \
emgu/bazel-android:dotnet-6.0-bazel-5.0.0-ubuntu-22.04 \
emgu/bazel-android:ubuntu-24.04-dotnet-8-bazelisk \
./build_tf_android $1

19 changes: 13 additions & 6 deletions platforms/ubuntu/docker/docker_build_tflite
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
#!/bin/bash
#!/bin/bash -v

cd "$(dirname "$0")"

mkdir -p /tmp/build_output

cd ../../..

USER_ID=$(id -u)
USER_NAME=$(whoami)

echo "USER_ID=$USER_ID"
echo "USER_NAME=$USER_NAME"

docker run \
-e USER="$(id -u)" \
-u="$(id -u)" \
-e USER="$USER_ID" \
-u="$USER_ID" \
-v $(pwd):/src/workspace \
-v /home/$USER_NAME/.cache/bazelisk:/home/$USER_NAME/.cache/bazelisk \
-v /tmp/build_output:/tmp/build_output \
-v /etc/passwd:/etc/passwd \
-w /src/workspace/platforms/ubuntu/22.04 \
emgu/bazel-android:dotnet-6.0-bazel-5.0.0-ubuntu-22.04 \
./bazel_build_tflite
-w /src/workspace/platforms/ubuntu/24.04 \
emgu/bazel-android:ubuntu-24.04-dotnet-8-bazelisk \
bash -c "./bazel_build_tflite"


13 changes: 10 additions & 3 deletions platforms/ubuntu/docker/docker_build_tflite_android
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,20 @@ mkdir -p /tmp/build_output

cd ../../..

USER_ID=$(id -u)
USER_NAME=$(whoami)

echo "USER_ID=$USER_ID"
echo "USER_NAME=$USER_NAME"

docker run \
-e USER="$(id -u)" \
-u="$(id -u)" \
-e USER="$USER_ID" \
-u="$USER_ID" \
-v $(pwd):/src/workspace \
-v /home/$USER_NAME/.cache/bazelisk:/home/$USER_NAME/.cache/bazelisk \
-v /tmp/build_output:/tmp/build_output \
-v /etc/passwd:/etc/passwd \
-w /src/workspace/platforms/android/ \
emgu/bazel-android:dotnet-6.0-bazel-5.0.0-ubuntu-22.04 \
emgu/bazel-android:ubuntu-24.04-dotnet-8-bazelisk \
./build_tflite_android $1

0 comments on commit 1ed603c

Please sign in to comment.