All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.tika.parser.recognition.tf.InceptionRestDockerfile Maven / Gradle / Ivy

There is a newer version: 3.1.0
Show newest version
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
FROM ubuntu

MAINTAINER Thamme Gowda  and Kranthi Kiran GV 

# Install missing part of ubuntu core + python stuff
RUN apt-get update && \
    apt-get install -y python-pip python-dev wget libtcmalloc-minimal4 git unzip

# Install tensorflow and other dependencies
RUN \
  pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.1-cp27-none-linux_x86_64.whl && \
  pip install flask requests

# Get the TF-slim dependencies 
# Downloading from a specific commit for future compatibility
RUN wget https://github.com/tensorflow/models/archive/c15fada28113eca32dc98d6e3bec4755d0d5b4c2.zip && \
	unzip c15fada28113eca32dc98d6e3bec4755d0d5b4c2.zip 

RUN \
  wget https://raw.githubusercontent.com/apache/tika/master/tika-parsers/src/main/resources/org/apache/tika/parser/recognition/tf/inceptionapi.py -O /usr/bin/inceptionapi.py && \
  chmod +x /usr/bin/inceptionapi.py

# clean up cache, so we can publish smaller image to hub
RUN apt-get clean
ENV PYTHONPATH="$PYTHONPATH:/models-c15fada28113eca32dc98d6e3bec4755d0d5b4c2/slim"
ENV LD_PRELOAD="/usr/lib/libtcmalloc_minimal.so.4"

# expose API port, this is the default port
EXPOSE 8764

CMD inceptionapi.py




© 2015 - 2025 Weber Informatics LLC | Privacy Policy