1FROM tensorflow/tensorflow:devel 2 3ENV ANDROID_DEV_HOME /android 4RUN mkdir -p ${ANDROID_DEV_HOME} 5 6# Install Android SDK. 7ENV ANDROID_SDK_FILENAME tools_r25.2.5-linux.zip 8ENV ANDROID_SDK_URL https://dl.google.com/android/repository/${ANDROID_SDK_FILENAME} 9ENV ANDROID_API_LEVEL 23 10ENV ANDROID_NDK_API_LEVEL 18 11# Build Tools Version liable to change. 12ENV ANDROID_BUILD_TOOLS_VERSION 28.0.0 13ENV ANDROID_SDK_HOME ${ANDROID_DEV_HOME}/sdk 14ENV PATH ${PATH}:${ANDROID_SDK_HOME}/tools:${ANDROID_SDK_HOME}/platform-tools 15RUN cd ${ANDROID_DEV_HOME} && \ 16 wget -q ${ANDROID_SDK_URL} && \ 17 unzip ${ANDROID_SDK_FILENAME} -d android-sdk-linux && \ 18 rm ${ANDROID_SDK_FILENAME} && \ 19 bash -c "ln -s ${ANDROID_DEV_HOME}/android-sdk-* ${ANDROID_SDK_HOME}" 20 21# Install Android NDK. 22ENV ANDROID_NDK_FILENAME android-ndk-r18b-linux-x86_64.zip 23ENV ANDROID_NDK_URL https://dl.google.com/android/repository/${ANDROID_NDK_FILENAME} 24ENV ANDROID_NDK_HOME ${ANDROID_DEV_HOME}/ndk 25ENV PATH ${PATH}:${ANDROID_NDK_HOME} 26RUN cd ${ANDROID_DEV_HOME} && \ 27 wget -q ${ANDROID_NDK_URL} && \ 28 unzip ${ANDROID_NDK_FILENAME} -d ${ANDROID_DEV_HOME} && \ 29 rm ${ANDROID_NDK_FILENAME} && \ 30 bash -c "ln -s ${ANDROID_DEV_HOME}/android-ndk-* ${ANDROID_NDK_HOME}" 31 32# Make android ndk executable to all users. 33RUN chmod -R go=u ${ANDROID_DEV_HOME} 34