-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
37 lines (27 loc) · 1023 Bytes
/
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
FROM python:3.8
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get clean && apt-get update && \
apt-get -y install --no-install-recommends \
build-essential \
software-properties-common \
supervisor \
&& \
rm -rf /var/lib/apt/lists/*
COPY ./consumers/fasttext/requirements.txt requirements.txt
RUN python3 -m pip --no-cache-dir install -r requirements.txt
COPY ./ml-serving ./ml-serving
WORKDIR /ml-serving
RUN python3 -m pip --no-cache-dir install .
WORKDIR /
RUN apt-get purge -y \
build-essential \
&& apt-get clean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/cache/apt/*
###########################################################
COPY ./consumers/fasttext ./consumers/fasttext
RUN mv /consumers/fasttext/supervisord.conf /etc/supervisor/conf.d/supervisord.conf && \
chmod +x /consumers/fasttext/src/main_predictor.py && \
chmod +x /consumers/fasttext/src/main_cache.py
EXPOSE 5000
ENTRYPOINT ["/usr/bin/supervisord"]