-
-
Notifications
You must be signed in to change notification settings - Fork 88
Expand file tree
/
Copy pathDockerfile-build-alpine
More file actions
48 lines (42 loc) · 1.22 KB
/
Copy pathDockerfile-build-alpine
File metadata and controls
48 lines (42 loc) · 1.22 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
FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx
FROM --platform=$BUILDPLATFORM alpine:3.24
ARG BUILD_PACKAGES="\
clang \
llvm \
make \
cmake \
lld \
curl \
pkgconfig"
RUN apk add --no-cache ${BUILD_PACKAGES}
ARG LMS_BUILD_PACKAGES=" \
gcc \
g++ \
alsa-lib-dev \
benchmark-dev \
boost-dev \
ffmpeg-dev \
gtest-dev \
libarchive-dev \
libconfig-dev \
musl-dev \
onnxruntime-dev \
pugixml-dev \
pulseaudio-dev \
stb \
taglib-dev \
wt-dev \
xxhash-dev"
COPY --from=xx / /
ARG TARGETPLATFORM
RUN xx-apk add --no-scripts --no-cache ${LMS_BUILD_PACKAGES}
# LMS
COPY . /tmp/lms/
ARG LMS_BUILD_TYPE="Release"
RUN \
DIR=/tmp/lms/build && mkdir -p ${DIR} && cd ${DIR} && \
xx-info is-cross && export BUILD_TESTS=OFF || export BUILD_TESTS=ON && \
PKG_CONFIG_PATH=/$(xx-info)/usr/lib/pkgconfig cmake /tmp/lms/ -DCMAKE_INCLUDE_PATH=/$(xx-info)/usr/include -DCMAKE_UNITY_BUILD=ON -DCMAKE_BUILD_TYPE=${LMS_BUILD_TYPE} $(xx-clang --print-cmake-defines) -DCMAKE_PREFIX_PATH=/$(xx-info)/usr/lib/cmake -DBUILD_TESTING=${BUILD_TESTS} -DBUILD_BENCHMARKS=ON && \
VERBOSE=1 make -j$(nproc) && \
xx-verify src/lms/lms && \
(xx-info is-cross || LMS_MUSICNN_MODEL=/tmp/lms/src/libs/audio/models/MSD_musicnn_embedding.onnx make test)