-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
48 lines (40 loc) · 1.11 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
ENV LANG=C.UTF-8
# install requirements
RUN \
apt-get update && \
apt-get install -y \
git \
cmake \
ninja-build \
llvm \
clang \
libxml2 \
vim \
r-base
# copy libs
COPY /lib /home/lib
# build mlir
RUN \
cd home/lib/mlir && \
cmake -G Ninja llvm -DLLVM_ENABLE_PROJECTS=mlir -DLLVM_BUILD_EXAMPLES=ON -DLLVM_TARGETS_TO_BUILD="host" -DCMAKE_BUILD_TYPE=Debug && \
ninja mlir-opt mlir-cpu-runner mlir_runner_utils mlir-translate
# build support lib
RUN \
cd /home/lib/support_lib && \
make
# copy computations and scripts
COPY expr /home/expr
COPY run_all.sh /home
RUN \
chmod u+x /home/run_all.sh
RUN \
mkdir /home/results && \
mkdir /home/results/mm && \
mkdir /home/results/convolution
COPY scripts/process_results.r /home/results
RUN \
GREEN='\033[1;32m' && NC='\033[0m' && \
RED='\033[0;31m' && \
echo "\n${GREEN}Please install cpupower on your host system (e.g. ${RED}apt-get install -y linux-tools-$(uname -r)${GREEN} ) and run ${RED}cpupower frequency-set --governor performance${GREEN} to ensure consistent results.${NC}\n"