-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (23 loc) · 845 Bytes
/
Dockerfile
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
FROM gcc:12.2 AS aml_builder
ARG JOBS=1
RUN apt update
RUN DEBIAN_FRONTEND=noninteractive apt install -y cmake make
RUN DEBIAN_FRONTEND=noninteractive apt install -y libboost-program-options-dev
RUN DEBIAN_FRONTEND=noninteractive apt install -y rpm
RUN DEBIAN_FRONTEND=noninteractive apt install -y catch2 libfmt-dev libspdlog-dev
COPY . /aml
WORKDIR /aml
RUN rm -rf ./build
RUN cmake -S. -B./build \
-D CMAKE_INSTALL_LIBDIR=lib \
-D CMAKE_INSTALL_INCLUDEDIR=include \
-D AML_PACKAGE_TYPE=DEB \
&& cmake --build ./build -j $JOBS \
&& cmake --build ./build --target package -j $JOBS
ENTRYPOINT ["./build/amlc"]
FROM ubuntu:22.04 as aml_compact
COPY --from=aml_builder /aml /aml_tmp
RUN find /aml_tmp -maxdepth 2 -name *.deb
RUN apt install `find /aml_tmp -maxdepth 2 -name *.deb`
RUN rm -rf aml_tmp
ENTRYPOINT ["amlc"]