-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
64 lines (46 loc) · 1.59 KB
/
Dockerfile
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
FROM ubuntu:16.04
LABEL maintainer="Amazon AI"
ARG MMS_VERSION=1.0.4
ARG MX_VERSION=1.4.1
# Python won’t try to write .pyc or .pyo files on the import of source modules
ENV PYTHONDONTWRITEBYTECODE=1 PYTHONUNBUFFERED=1
RUN apt-get update && apt-get install -y --no-install-recommends \
openjdk-8-jdk-headless \
ca-certificates \
curl \
wget \
git \
vim \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get install -y python-pip
#Only major change ferom the cpu file
RUN pip install --no-cache https://s3.amazonaws.com/amazonei-apachemxnet/amazonei_mxnet-1.4.1-py2.py3-none-manylinux1_x86_64.whl
# \
#keras-mxnet==2.2.4.1 \
#onnx==1.4.1
#Some issue with python 2 for the above ones.
# See http://bugs.python.org/issue19846
ENV LANG C.UTF-8
ARG PYTHON=python
ARG PYTHON_PIP=python-pip
ARG PIP=pip
RUN apt-get update && apt-get install -y \
${PYTHON} \
${PYTHON_PIP} \
&& rm -rf /var/lib/apt/lists/*
RUN ${PIP} --no-cache-dir install --upgrade pip setuptools
RUN ln -s $(which ${PYTHON}) /usr/local/bin/python
RUN ${PIP} install --no-cache-dir mxnet-mkl==$MX_VERSION \
mxnet-model-server==$MMS_VERSION
RUN useradd -m model-server \
&& mkdir -p /home/model-server/tmp
COPY mms-entrypoint.sh /usr/local/bin/dockerd-entrypoint.sh
COPY config.properties /home/model-server
RUN chmod +x /usr/local/bin/dockerd-entrypoint.sh \
&& chown -R model-server /home/model-server
EXPOSE 8080 8081
USER model-server
WORKDIR /home/model-server
ENV TEMP=/home/model-server/tmp
ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh"]
CMD ["serve"]