File tree Expand file tree Collapse file tree 1 file changed +34
-2
lines changed Expand file tree Collapse file tree 1 file changed +34
-2
lines changed Original file line number Diff line number Diff line change
1
+ # The build stage
2
+ # ---------------
3
+ FROM python:3.9-bullseye as build-stage
4
+
5
+ # VULN_SCAN_TIME=2022-08-08_05:22:22
6
+
7
+ WORKDIR /build-stage
8
+
9
+ # Build wheels for packages that require gcc or other build dependencies and
10
+ # lack wheels either for amd64 or aarch64.
11
+ #
12
+ # - https://pypi.org/project/psutil/#files, no wheels available as of 5.9.1
13
+ # for aarch64. See https://github.com/giampaolo/psutil/pull/2070.
14
+ #
15
+ # If you find a dependency here no longer listed in requirements.txt, remove it
16
+ # from here as well. The more wheels we build here and copy and then install,
17
+ # where the copy and install are separate steps, the larger the final image
18
+ # becomes.
19
+ #
20
+ COPY requirements.txt requirements.txt
21
+ RUN pip install build \
22
+ && pip wheel \
23
+ $(cat requirements.txt | grep "psutil==" )
24
+
25
+
26
+ # The final stage
27
+ # ---------------
28
+
1
29
FROM python:3.9-slim-bullseye
2
30
3
31
# VULN_SCAN_TIME=
@@ -19,13 +47,17 @@ RUN apt-get update \
19
47
&& apt-get install -y --no-install-recommends \
20
48
ca-certificates \
21
49
dnsutils \
22
- git \
23
50
iputils-ping \
24
51
tini \
52
+ # requirement for nbgitpuller
53
+ git \
25
54
&& rm -rf /var/lib/apt/lists/*
26
55
56
+ COPY --from=build-stage /build-stage/*.whl /tmp/pre-built-wheels/
27
57
COPY requirements.txt /tmp/requirements.txt
28
- RUN pip install --no-cache-dir -r /tmp/requirements.txt
58
+ RUN pip install --no-cache-dir \
59
+ /tmp/pre-built-wheels/*.whl \
60
+ -r /tmp/requirements.txt
29
61
30
62
WORKDIR ${HOME}
31
63
USER ${NB_USER}
You can’t perform that action at this time.
0 commit comments