Last active
October 19, 2016 20:51
-
-
Save johndpope/d41a7d6daf8652cbdaff41a2b063c801 to your computer and use it in GitHub Desktop.
Parsey McParseface - API Dockerfile (osx needs heaps of RAM) https://github.com/dsindex/syntaxnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use this docker-compose.yml file to start services. | |
# https://github.com/johndpope/DockerParseyAPI | |
# https://github.com/tensorflow/tensorflow/tree/master/tensorflow/tools/docker | |
# https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/docker/Dockerfile.devel | |
# https://github.com/tensorflow/tensorflow/blob/master/tensorflow/tools/docker/Dockerfile.devel-gpu | |
FROM gcr.io/tensorflow/tensorflow:latest-devel | |
ENV SYNTAXNETDIR=/work/serving/tensorflow PATH=$PATH:/root/bin | |
#https://tensorflow.github.io/serving/setup | |
RUN apt-get update && apt-get install -y \ | |
build-essential \ | |
curl \ | |
git \ | |
libfreetype6-dev \ | |
libpng12-dev \ | |
libzmq3-dev \ | |
libcurl3-dev \ | |
#libgrpc-dev \ | |
pkg-config \ | |
python-dev \ | |
python-numpy \ | |
python-pip \ | |
software-properties-common \ | |
swig \ | |
wget \ | |
zip \ | |
zlib1g-dev | |
RUN wget https://gist.githubusercontent.com/johndpope/fc1c2327a4ae255d9c44dda9b67b5288/raw/406369ecc157d60f7a9bac2a0d5be3da9aa62e56/parseyapi.sh \ | |
&& chmod +x parseyapi.sh \ | |
&& ./parseyapi.sh | |
EXPOSE 9000 | |
RUN find / -name "parsey_api" -size +512k |xargs cp -t /work/serving | |
RUN cd /work/serving | |
WORKDIR /work/serving | |
CMD ["/bin/bash"] | |
# COMMANDS to build and run API Server | |
# =============================== | |
# see here https://github.com/johndpope/DockerParseyAPI |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
N.B. if you're running docker for windows / linux you maybe able to tweak gpu / cuda settings in this script
https://gist.github.com/johndpope/fc1c2327a4ae255d9c44dda9b67b5288