-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
74 lines (58 loc) · 2.08 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
65
66
67
68
69
70
71
72
73
74
# Created by: George Corrêa de Araújo (george.gcac@gmail.com)
# ==================================================================
# FROM python:latest
FROM python:3.10
ARG GROUPID=901
ARG GROUPNAME=fasttext
ARG USERID=901
ARG USERNAME=user
# Environment variables
RUN APT_INSTALL="apt-get install -y --no-install-recommends" && \
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 && \
# ==================================================================
# libraries via apt-get
# ------------------------------------------------------------------
rm -rf /var/lib/apt/lists/* && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive $APT_INSTALL \
curl \
git \
locales \
wget && \
# ==================================================================
# python libraries via pip
# ------------------------------------------------------------------
$PIP_INSTALL \
pip \
wheel && \
$PIP_INSTALL \
colorama \
fasttext \
ipdb \
ipython \
numpy \
pandas \
pyarrow \
scikit-learn \
tqdm \
unidecode && \
# ==================================================================
# config & cleanup
# ------------------------------------------------------------------
ldconfig && \
apt-get clean && \
apt-get autoremove && \
rm -rf /var/lib/apt/lists/* /tmp/* ~/*
RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& sed -i -e 's/# pt_BR.UTF-8 UTF-8/pt_BR.UTF-8 UTF-8/' /etc/locale.gen \
&& locale-gen
ENV LC_ALL pt_BR.UTF-8
USER $USERNAME