-
Notifications
You must be signed in to change notification settings - Fork 167
/
Copy pathDockerfile
74 lines (65 loc) · 2.53 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Create a docker image for running the benchmarks.
# Build:
# > docker build -t <mytag> .
#
# To Run:
# > docker run -it <mytag>
# or
# > docker run -v <local-dir> -it <mytag>
FROM ubuntu:20.04
RUN apt-get update
RUN apt-get install -y --no-install-recommends ca-certificates
RUN apt-get install -y --no-install-recommends cmake make
RUN apt-get install -y --no-install-recommends git
RUN apt-get install -y --no-install-recommends gcc libc-dev
RUN apt-get install -y --no-install-recommends curl xz-utils gnupg netbase zlib1g-dev
RUN apt-get install -y --no-install-recommends build-essential tar
RUN rm -rf /var/lib/apt/lists/*
# Swift
WORKDIR /build
RUN curl -O https://download.swift.org/swift-5.6.1-release/ubuntu2004/swift-5.6.1-RELEASE/swift-5.6.1-RELEASE-ubuntu20.04.tar.gz
RUN tar -xzf swift-5.6.1-RELEASE-ubuntu20.04.tar.gz
WORKDIR /build/swift-5.6.1-RELEASE-ubuntu20.04/usr
RUN mkdir /opt/swift
RUN cp -r * /opt/swift
# Java
WORKDIR /build
RUN apt-get update
RUN apt-get install -y --no-install-recommends software-properties-common
RUN add-apt-repository ppa:linuxuprising/java
RUN echo debconf shared/accepted-oracle-license-v1-3 select true | debconf-set-selections
RUN echo debconf shared/accepted-oracle-license-v1-3 seen true | debconf-set-selections
RUN apt-get install -y --no-install-recommends oracle-java17-installer
RUN apt-get install -y --no-install-recommends oracle-java17-set-default
RUN apt-get install -y --no-install-recommends libedit2 libz3-dev
RUN apt-get install -y --no-install-recommends time
# Haskell
WORKDIR /build
RUN apt-get install -y --no-install-recommends ghc cabal-install
RUN cabal update
RUN cabal install parallel
# OCaml (multicore)
WORKDIR /build
RUN apt-get install -y --no-install-recommends opam
RUN opam init -y --disable-sandboxing
RUN opam update -y
RUN opam switch -y create 4.14.0 --repositories=multicore=git+https://github.com/ocaml-multicore/multicore-opam.git,default
# Stack
WORKDIR /build
RUN curl -sSL https://get.haskellstack.org/ | sh
RUN git clone --recursive https://github.com/koka-lang/koka -b v2.4.1-artifact
# Koka
WORKDIR /build/koka
RUN stack build
RUN apt-get install -y --no-install-recommends pcre2-utils
RUN stack exec koka -- -e util/bundle -- --postfix=docker
RUN util/install.sh -f -b bundle/v2.4.1/koka-docker.tar.gz
# Benchmarks
WORKDIR /build/koka/test/bench
RUN mkdir build
WORKDIR /build/koka/test/bench/build
RUN cmake .. -DCMAKE_BUILD_TYPE=Release
SHELL ["/bin/bash", "-c"]
RUN eval $(opam env) && cmake --build .
RUN echo "ulimit -s unlimited" >> ~/.bashrc
RUN opam env >> ~/.bashrc