-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
56 lines (44 loc) · 1.5 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
# Created by: George Corrêa de Araújo (george.gcac@gmail.com)
# ==================================================================
# FROM python:latest
FROM python:3.11
ARG GROUPID=901
ARG GROUPNAME=searcher
ARG USERID=901
ARG USERNAME=user
# Environment variables
RUN PIP_INSTALL="pip --no-cache-dir install --upgrade" && \
# ==================================================================
# Create a system group with name deeplearning and id 901 to avoid
# conflict with existing uids on the host system
# Create a system user with id 901 that belongs to group deeplearning
# ------------------------------------------------------------------
groupadd -r $GROUPNAME -g $GROUPID && \
# useradd -u $USERID -r -g $GROUPNAME $USERNAME && \
useradd -u $USERID -m -g $GROUPNAME $USERNAME && \
# ==================================================================
# python libraries via pip
# ------------------------------------------------------------------
$PIP_INSTALL \
pip \
wheel && \
$PIP_INSTALL \
flask \
Flask-Minify \
flask-paginate \
gunicorn \
numpy \
pandas \
pyarrow \
scipy \
unidecode && \
# ==================================================================
# config & cleanup
# ------------------------------------------------------------------
ldconfig && \
apt-get clean && \
apt-get autoremove && \
rm -rf /var/lib/apt/lists/* /tmp/* ~/*
# Flask port
EXPOSE 5000
USER $USERNAME