1
- # Use Alpine Linux as the parent image
2
1
FROM ubuntu:20.04
3
2
4
3
ENV DEBIAN_FRONTEND=noninteractive
5
4
6
- RUN apt-get -y update
7
-
8
- RUN apt-get install -y wget gnupg lsb-core software-properties-common
9
-
10
- RUN wget -O key.key https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add key.key
11
-
12
- RUN apt-add-repository "deb http://apt.llvm.org/`lsb_release -c | cut -f2`/ llvm-toolchain-`lsb_release -c | cut -f2`-12 main"
13
-
14
- RUN apt-get install -y autoconf cmake ninja-build gcc g++ libtool gfortran llvm-12-dev clang-12 libopenmpi-dev openmpi-bin git
5
+ RUN apt-get -y update && apt-get install -y --no-install-recommends curl gnupg lsb-core software-properties-common \
6
+ && curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key|apt-key add - \
7
+ && apt-add-repository "deb http://apt.llvm.org/`lsb_release -c | cut -f2`/ llvm-toolchain-`lsb_release -c | cut -f2`-12 main" \
8
+ && apt-get install -y --no-install-recommends autoconf cmake ninja-build gcc g++ libtool gfortran llvm-12-dev clang-12 libopenmpi-dev openmpi-bin git \
9
+ && apt-get autoremove -y --purge \
10
+ && apt-get clean -y \
11
+ && rm -rf /var/lib/apt/lists/*
15
12
16
13
# Get & install Enzyme
17
14
RUN git clone https://github.com/wsmoses/Enzyme.git \
@@ -20,6 +17,8 @@ RUN git clone https://github.com/wsmoses/Enzyme.git \
20
17
&& cmake -G Ninja .. -DCMAKE_BUILD_TYPE=Debug \
21
18
&& ninja
22
19
23
- RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 10 --slave /usr/bin/clang++ clang++ /usr/bin/clang++-12
24
- RUN update-alternatives --install /usr/bin/opt opt /usr/bin/opt-12 10
25
- RUN update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /usr/bin/llvm-symbolizer-12 10
20
+ RUN update-alternatives --install /usr/bin/clang clang /usr/bin/clang-12 10 --slave /usr/bin/clang++ clang++ /usr/bin/clang++-12 \
21
+ && update-alternatives --install /usr/bin/opt opt /usr/bin/opt-12 10 \
22
+ && update-alternatives --install /usr/bin/llvm-symbolizer llvm-symbolizer /usr/bin/llvm-symbolizer-12 10
23
+
24
+ ENV DEBIAN_FRONTEND=
0 commit comments