-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
58 lines (46 loc) · 1.58 KB
/
Copy pathDockerfile
File metadata and controls
58 lines (46 loc) · 1.58 KB
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
FROM python:3.12-slim AS base
ENV DEBIAN_FRONTEND=noninteractive \
PIP_DISABLE_PIP_VERSION_CHECK=1 \
PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
pkg-config \
sudo \
passwd \
xvfb \
xauth \
libgl1 \
libgles2 \
libegl1 \
libopengl0 \
libglib2.0-0 \
libsm6 \
libxext6 \
libxrender1 \
libxcb1 \
libevdev-dev \
libinih-dev \
libpam0g-dev \
nano \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /workspace
RUN ln -sf /usr/local/bin/python3 /usr/bin/python3
COPY requirements.txt /tmp/requirements.txt
RUN python -m pip install --upgrade pip \
&& python -m pip install pytest meson ninja
# Default test image intentionally skips mediapipe for faster, more reliable runs.
FROM base AS test
RUN grep -v '^mediapipe==' /tmp/requirements.txt > /tmp/requirements-test.txt \
&& python -m pip install -r /tmp/requirements-test.txt
COPY docker/entrypoint-pytest.sh /usr/local/bin/entrypoint-pytest.sh
RUN chmod +x /usr/local/bin/entrypoint-pytest.sh
ENTRYPOINT ["/usr/local/bin/entrypoint-pytest.sh"]
CMD ["tests", "-v", "-m", "not mediapipe_integration", "-o", "cache_dir=/tmp/pytest_cache"]
# Optional image for PAM smoke tests; includes full requirements.
FROM base AS pam-smoke
RUN python -m pip install -r /tmp/requirements.txt
COPY docker/entrypoint-pam-sudo-smoke.sh /usr/local/bin/entrypoint-pam-sudo-smoke.sh
RUN chmod +x /usr/local/bin/entrypoint-pam-sudo-smoke.sh
ENTRYPOINT ["/usr/local/bin/entrypoint-pam-sudo-smoke.sh"]