-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile.sci
More file actions
64 lines (59 loc) · 1.6 KB
/
Copy pathDockerfile.sci
File metadata and controls
64 lines (59 loc) · 1.6 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
58
59
60
61
62
63
64
ARG ARCH=amd64
ARG DISTRO=focal
FROM ghcr.io/linuxserver/baseimage-ubuntu:${ARCH}-${DISTRO} as builder
ARG ARCH=amd64
ARG DISTRO=focal
ARG PACKAGES="scipy scikit-learn"
RUN \
echo "**** Installing dependencies ****" && \
apt-get update && \
apt-get install --no-install-recommends -y \
build-essential \
cmake \
dh-autoreconf \
gfortran \
git \
jq \
libopenblas-dev \
libjpeg-dev \
pkg-config \
python3-dev \
python3-pip \
python3-venv \
zlib1g-dev && \
python3 -m venv /build-env && \
. /build-env/bin/activate && \
pip3 install -U pip setuptools wheel cython && \
mkdir -p /build && \
pip wheel --wheel-dir=/build -f https://wheel-index.linuxserver.io/ubuntu/ -v ninja patchelf && \
pip install /build/ninja-* /build/patchelf-* && \
pip wheel --wheel-dir=/build -f https://wheel-index.linuxserver.io/ubuntu/ -v \
${PACKAGES} && \
echo "**** Clean up ****" && \
apt-get purge --auto-remove -y \
build-essential \
cmake \
dh-autoreconf \
gfortran \
git \
jq \
libopenblas-dev \
libjpeg-dev \
pkg-config \
python3-dev \
python3-pip \
python3-venv \
zlib1g-dev && \
apt-get clean && \
rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/* \
${HOME}/.cargo \
${HOME}/.cache && \
echo "**** Renaming wheels if necessary ****" && \
/bin/bash -c 'for i in $(ls /build/*armv8l*.whl 2>/dev/null); do echo "processing ${i}" && cp -- "$i" "${i//armv8l/armv7l}"; done' && \
echo "**** Wheels built are: ****" && \
ls /build
FROM scratch as artifacts
COPY --from=builder /build /build