"git@developer.sourcefind.cn:OpenDAS/mmdetection3d.git" did not exist on "7cd3060e1e33218bfd55c5e4bb421cfa054c20f1"
Unverified Commit a341a46a authored by Anusha's avatar Anusha Committed by GitHub
Browse files

Fix android object_detection Dockerfile (#7897)

The current android Dockerfile for object detectiion is not functional anymore. This commit fixes it by the following changes:
 - install gpg-agent, update google-cloud-sdk installation from https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu
 - use non-interactive front end to set default tzdata configuration (required for TF object detection installation)
 - fix the tensorflow configuration

Leaving the base image untouched, although nightly-devel is no longer actively maintained. It may be worth upgrading as a separate effort later.
parent 55259ca9
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
# limitations under the License. # limitations under the License.
# #========================================================================== # #==========================================================================
# Pull TF nightly-devel docker image
FROM tensorflow/tensorflow:nightly-devel FROM tensorflow/tensorflow:nightly-devel
# Get the tensorflow models research directory, and move it into tensorflow # Get the tensorflow models research directory, and move it into tensorflow
...@@ -23,7 +24,7 @@ RUN git clone --depth 1 https://github.com/tensorflow/models.git && \ ...@@ -23,7 +24,7 @@ RUN git clone --depth 1 https://github.com/tensorflow/models.git && \
# Install gcloud and gsutil commands # Install gcloud and gsutil commands
# https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu # https://cloud.google.com/sdk/docs/quickstart-debian-ubuntu
RUN export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" && \ RUN apt-get -y update && apt-get install -y gpg-agent && export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" && \
echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \ echo "deb http://packages.cloud.google.com/apt $CLOUD_SDK_REPO main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && \
curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \ curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - && \
apt-get update -y && apt-get install google-cloud-sdk -y apt-get update -y && apt-get install google-cloud-sdk -y
...@@ -32,8 +33,8 @@ RUN export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" && \ ...@@ -32,8 +33,8 @@ RUN export CLOUD_SDK_REPO="cloud-sdk-$(lsb_release -c -s)" && \
# Install the Tensorflow Object Detection API from here # Install the Tensorflow Object Detection API from here
# https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/installation.md # https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/installation.md
# Install object detection api dependencies # Install object detection api dependencies - use non-interactive mode to set default tzdata config during installation
RUN apt-get install -y protobuf-compiler python-pil python-lxml python-tk && \ RUN export DEBIAN_FRONTEND=noninteractive && apt-get install -y protobuf-compiler python-pil python-lxml python-tk && \
pip install Cython && \ pip install Cython && \
pip install contextlib2 && \ pip install contextlib2 && \
pip install jupyter && \ pip install jupyter && \
...@@ -130,7 +131,7 @@ RUN cd /opt && \ ...@@ -130,7 +131,7 @@ RUN cd /opt && \
# Configure the build to use the things we just downloaded # Configure the build to use the things we just downloaded
RUN cd /tensorflow && \ RUN cd /tensorflow && \
printf '\n\nn\ny\nn\nn\nn\ny\nn\nn\nn\nn\nn\nn\n\ny\n%s\n\n\n' ${ANDROID_HOME}|./configure printf '\n\n\nn\ny\nn\nn\nn\ny\nn\nn\nn\nn\nn\nn\n\ny\n%s\n\n\n' ${ANDROID_HOME}|./configure
WORKDIR /tensorflow WORKDIR /tensorflow
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment