This repository was archived by the owner on Mar 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (32 loc) · 1.27 KB
/
Dockerfile
File metadata and controls
38 lines (32 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
FROM ubuntu:18.04
#
# Reference: https://github.com/tensorflow/serving/issues/819
#
# Install general packages
RUN apt-get update && apt-get install -y \
curl \
libcurl3-dev \
unzip \
wget \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Previous Installation of tensorflow-model-server (BROKEN RECENTLY)
#RUN echo "deb [arch=amd64] http://storage.googleapis.com/tensorflow-serving-apt stable tensorflow-model-server tensorflow-model-server-universal" | tee /etc/apt/sources.list.d/tensorflow-serving.list \
# && curl https://storage.googleapis.com/tensorflow-serving-apt/tensorflow-serving.release.pub.gpg | apt-key add - \
# && apt-get update && apt-get install tensorflow-model-server
# New installation of tensorflow-model-server
RUN TEMP_DEB="$(mktemp)" \
&& wget -O "$TEMP_DEB" 'http://storage.googleapis.com/tensorflow-serving-apt/pool/tensorflow-model-server-1.12.0/t/tensorflow-model-server/tensorflow-model-server_1.12.0_all.deb' \
&& dpkg -i "$TEMP_DEB" \
&& rm -f "$TEMP_DEB"
# gRPC port
EXPOSE 8500
# REST API port
EXPOSE 8501
# Serve the model when the container starts
CMD tensorflow_model_server \
--port=8500 \
--rest_api_port=8501 \
--model_name="$MODEL_NAME" \
--model_base_path="$MODEL_PATH"