-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
62 lines (47 loc) · 1.76 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
# Created by: George Araújo (george.gcac@gmail.com)
# ==================================================================
# FROM python:latest
FROM python:3.10
ARG GROUPID=901
ARG GROUPNAME=scrapper
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 \
wget && \
# ==================================================================
# python libraries via pip
# ------------------------------------------------------------------
$PIP_INSTALL \
pip \
wheel && \
$PIP_INSTALL \
"numpy<2" \
openreview-py \
pandas \
scrapy \
tqdm && \
# ==================================================================
# config & cleanup
# ------------------------------------------------------------------
ldconfig && \
apt-get clean && \
apt-get autoremove && \
rm -rf /var/lib/apt/lists/* /tmp/* ~/*
USER $USERNAME