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] Fix Dockerfile.demo_android #6361

Merged
merged 2 commits into from Aug 31, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions docker/Dockerfile.demo_android
Expand Up @@ -47,10 +47,7 @@ RUN bash /install/ubuntu_install_androidsdk.sh
COPY install/ubuntu_install_vulkan.sh /install/ubuntu_install_vulkan.sh
RUN bash /install/ubuntu_install_vulkan.sh

ENV VULKAN_SDK /usr/local/VulkanSDK/1.0.65.0/x86_64
ENV PATH ${PATH}:${VULKAN_SDK}/bin
ENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH}:${VULKAN_SDK}/lib
ENV VK_LAYER_PATH ${VULKAN_SDK}/etc/explicit_layer.d
ENV VULKAN_SDK=/usr
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as #5566


RUN git clone https://github.com/KhronosGroup/OpenCL-Headers /usr/local/OpenCL-Headers/

Expand All @@ -72,3 +69,4 @@ RUN cd /usr && \
# Environment variables
ENV PYTHONPATH=/usr/tvm/python:/usr/tvm/vta/python:${PYTHONPATH}
ENV ANDROID_HOME=/opt/android-sdk-linux/
ENV ANDROID_NDK_HOME=/opt/android-sdk-linux/ndk/21.3.6528147/
12 changes: 5 additions & 7 deletions docker/install/ubuntu_install_androidsdk.sh
Expand Up @@ -55,8 +55,6 @@ build-tools;26.0.3
build-tools;27.0.3
cmake;3.6.4111459
emulator
extras;android;gapid;1
extras;android;gapid;3
extras;android;m2repository
extras;google;auto
extras;google;google_play_services
Expand All @@ -68,20 +66,20 @@ extras;google;simulators
extras;google;webdriver
extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2
extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2
lldb;2.3
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I check with sdkmanager --list, I Deleted the package that does not currently exist.

platforms;android-26
platforms;android-27
tools
ndk-bundle
ndk;21.3.6528147
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ndk-bundle install the latest NDK version.
I specified the currently latest version.

EOF

mkdir /root/.android 2>/dev/null || true
touch /root/.android/repositories.cfg
(yes || true) | sdkmanager --licenses --sdk_root="$ANDROID_HOME"
# NOTE: sdkmanager returns exit code 141
(yes || true) | sdkmanager --licenses --sdk_root="$ANDROID_HOME" || true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sdkmanager --verbose --package_file=/install/package-list-minimal.txt --sdk_root="$ANDROID_HOME"
test -d "${ANDROID_HOME}/build-tools/27.0.3"
test -d "${ANDROID_HOME}/ndk-bundle"
for f in ${ANDROID_HOME}/ndk-bundle/* ; do
test -d "${ANDROID_HOME}/ndk/21.3.6528147"
for f in ${ANDROID_HOME}/ndk/21.3.6528147/* ; do
ln --symbolic "$f" "/usr/bin/`basename $f`"
done
echo "export ANDROID_HOME=${ANDROID_HOME}" >> /etc/profile
Expand Down
2 changes: 1 addition & 1 deletion tutorials/frontend/deploy_model_on_android.py
Expand Up @@ -145,7 +145,7 @@
#
# .. code-block:: bash
#
# /opt/android-sdk-linux/ndk-bundle/build/tools/make-standalone-toolchain.sh \
# $ANDROID_NDK_HOME/build/tools/make-standalone-toolchain.sh \
# --platform=android-24 --use-llvm --arch=arm64 --install-dir=/opt/android-toolchain-arm64
# export TVM_NDK_CC=/opt/android-toolchain-arm64/bin/aarch64-linux-android-g++
#
Expand Down