-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 843 Bytes
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 843 Bytes
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
FROM python:3.11
ARG USER_ID=1000
ARG GROUP_ID=1000
ARG AUX_GROUP_IDS=""
ARG USERNAME=user
# Add non-root user and give permissions to workdir:
RUN groupadd --gid "${GROUP_ID}" "${USERNAME}" && \
useradd -m --uid "${USER_ID}" --gid "${GROUP_ID}" "${USERNAME}" && \
echo "${AUX_GROUP_IDS}" | xargs -n1 echo | xargs -I% groupadd --gid % group% && \
echo "${AUX_GROUP_IDS}" | xargs -n1 echo | xargs -I% usermod --append --groups group% "${USERNAME}"
RUN apt-get update
RUN apt-get autoclean && \
apt-get install -y --no-install-recommends \
libegl1-mesa \
libgl1 \
libdbus-1-3 \
&& apt-get clean
WORKDIR /home/app
COPY requirements.txt setup.py ./
COPY requirements_ci.txt .
RUN pip install -r requirements_ci.txt
ENV PYTHONPATH=".:$PYTHONPATH"
ENV PYTHONPATH="submodules/evaluation:$PYTHONPATH"
USER user