Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor dockerfiles #59

Merged
merged 2 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ DOCKERHUB=effecthandlers/effect-handlers

all: bench_eff bench_hia bench_koka bench_links bench_ocaml

system_base:
docker build -t $(DOCKERHUB):base systems

# Eff in ocaml
system_eff:
system_eff: system_base
docker build -t $(DOCKERHUB):eff systems/eff

bench_eff: system_eff
Expand All @@ -15,7 +18,7 @@ test_eff: system_eff
make -C /source/benchmarks/eff test

# Effekt
system_effekt:
system_effekt: system_base
docker build -t $(DOCKERHUB):effekt systems/effekt

bench_effekt: system_effekt
Expand All @@ -27,7 +30,7 @@ test_effekt: system_effekt
make -C /source/benchmarks/effekt test

# Handlers in Action
system_hia:
system_hia: system_base
docker build -t $(DOCKERHUB):hia systems/hia

bench_hia: system_hia
Expand All @@ -39,7 +42,7 @@ test_hia: system_hia
make -C /source/benchmarks/hia test

# Koka
system_koka:
system_koka: system_base
docker build -t effecthandlers/effect-handlers:koka systems/koka

bench_koka: system_koka
Expand All @@ -51,7 +54,7 @@ test_koka: system_koka
make -C /source/benchmarks/koka test

# libmpeff
system_libmpeff:
system_libmpeff: system_base
docker build -t $(DOCKERHUB):libmpeff systems/libmpeff

bench_libmpeff: system_libmpeff
Expand All @@ -63,7 +66,7 @@ test_libmpeff: system_libmpeff
make -C /source/benchmarks/libmpeff test

# Links
system_links:
system_links: system_base
docker build -t $(DOCKERHUB):links systems/links

bench_links: system_links
Expand All @@ -75,7 +78,7 @@ test_links: system_links
make -C /source/benchmarks/links test

# libhandler
system_libhandler:
system_libhandler: system_base
docker build -t $(DOCKERHUB):libhandler systems/libhandler

bench_libhandler: system_libhandler
Expand All @@ -87,7 +90,7 @@ test_libhandler: system_libhandler
make -C /source/benchmarks/libhandler test

# Multicore OCaml
system_ocaml:
system_ocaml: system_base
docker build -t $(DOCKERHUB):ocaml systems/ocaml

bench_ocaml: system_ocaml
Expand Down
30 changes: 30 additions & 0 deletions systems/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true

# Get the basic stuff
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y \
sudo

# Create ubuntu user with sudo privileges
RUN useradd -ms /bin/bash ubuntu && \
usermod -aG sudo ubuntu
# New added for disable sudo password
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

# Set as default user
USER ubuntu
WORKDIR /home/ubuntu

# Install hyperfine
RUN sudo apt install -y wget
RUN export bleah=$(arch); wget https://github.com/sharkdp/hyperfine/releases/download/v1.15.0/hyperfine_1.15.0_amd64.deb
RUN sudo dpkg -i hyperfine_1.15.0_amd64.deb

# Configure tzdata
RUN echo 'tzdata tzdata/Areas select Europe' | sudo debconf-set-selections
RUN echo 'tzdata tzdata/Zones/Europe select London' | sudo debconf-set-selections
RUN sudo apt-get install -qqy --no-install-recommends tzdata
26 changes: 1 addition & 25 deletions systems/eff/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true

# Get the basic stuff
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y \
sudo

# Create ubuntu user with sudo privileges
RUN useradd -ms /bin/bash ubuntu && \
usermod -aG sudo ubuntu
# New added for disable sudo password
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

# Set as default user
USER ubuntu
WORKDIR /home/ubuntu

# Install hyperfine
RUN sudo apt install -y wget
RUN wget https://github.com/sharkdp/hyperfine/releases/download/v1.15.0/hyperfine_1.15.0_amd64.deb
RUN sudo dpkg -i hyperfine_1.15.0_amd64.deb
FROM effecthandlers/effect-handlers:base

# Install OCaml
RUN sudo apt install -y wget git curl gcc make m4 unzip bubblewrap bzip2
Expand Down
26 changes: 1 addition & 25 deletions systems/effekt/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true

# Get the basic stuff
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y \
sudo

# Create ubuntu user with sudo privileges
RUN useradd -ms /bin/bash ubuntu && \
usermod -aG sudo ubuntu
# New added for disable sudo password
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

# Set as default user
USER ubuntu
WORKDIR /home/ubuntu

# Install hyperfine
RUN sudo apt install -y wget
RUN wget https://github.com/sharkdp/hyperfine/releases/download/v1.15.0/hyperfine_1.15.0_amd64.deb
RUN sudo dpkg -i hyperfine_1.15.0_amd64.deb
FROM effecthandlers/effect-handlers:base

# Install Effekt
RUN sudo apt install -y wget
Expand Down
26 changes: 1 addition & 25 deletions systems/hia/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true

# Get the basic stuff
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y \
sudo

# Create ubuntu user with sudo privileges
RUN useradd -ms /bin/bash ubuntu && \
usermod -aG sudo ubuntu
# New added for disable sudo password
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

# Set as default user
USER ubuntu
WORKDIR /home/ubuntu

# Install hyperfine
RUN sudo apt install -y wget
RUN wget https://github.com/sharkdp/hyperfine/releases/download/v1.15.0/hyperfine_1.15.0_amd64.deb
RUN sudo dpkg -i hyperfine_1.15.0_amd64.deb
FROM effecthandlers/effect-handlers:base

# Install GHC 8.6.5
RUN sudo apt install -y git wget curl build-essential libgmp-dev libtinfo-dev
Expand Down
31 changes: 1 addition & 30 deletions systems/koka/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,4 @@
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true

# Get the basic stuff
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y \
sudo

# Create ubuntu user with sudo privileges
RUN useradd -ms /bin/bash ubuntu && \
usermod -aG sudo ubuntu
# New added for disable sudo password
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

# Set as default user
USER ubuntu
WORKDIR /home/ubuntu

# Install hyperfine
RUN sudo apt install -y wget
RUN wget https://github.com/sharkdp/hyperfine/releases/download/v1.15.0/hyperfine_1.15.0_amd64.deb
RUN sudo dpkg -i hyperfine_1.15.0_amd64.deb

# Configure tzdata
RUN echo 'tzdata tzdata/Areas select Europe' | sudo debconf-set-selections
RUN echo 'tzdata tzdata/Zones/Europe select London' | sudo debconf-set-selections
RUN sudo apt-get install -qqy --no-install-recommends tzdata
FROM effecthandlers/effect-handlers:base

# Install Koka
RUN sudo apt install -y curl
Expand Down
26 changes: 1 addition & 25 deletions systems/libhandler/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true

# Get the basic stuff
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y \
sudo

# Create ubuntu user with sudo privileges
RUN useradd -ms /bin/bash ubuntu && \
usermod -aG sudo ubuntu
# New added for disable sudo password
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

# Set as default user
USER ubuntu
WORKDIR /home/ubuntu

# Install hyperfine
RUN sudo apt install -y wget
RUN wget https://github.com/sharkdp/hyperfine/releases/download/v1.15.0/hyperfine_1.15.0_amd64.deb
RUN sudo dpkg -i hyperfine_1.15.0_amd64.deb
FROM effecthandlers/effect-handlers:base

# Install libhandler
RUN sudo apt install -y wget git curl gcc make m4
Expand Down
31 changes: 1 addition & 30 deletions systems/libmpeff/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,4 @@
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true

# Get the basic stuff
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y \
sudo

# Create ubuntu user with sudo privileges
RUN useradd -ms /bin/bash ubuntu && \
usermod -aG sudo ubuntu
# New added for disable sudo password
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

# Set as default user
USER ubuntu
WORKDIR /home/ubuntu

# Configure tzdata
RUN echo 'tzdata tzdata/Areas select Europe' | sudo debconf-set-selections
RUN echo 'tzdata tzdata/Zones/Europe select London' | sudo debconf-set-selections
RUN sudo apt-get install -qqy --no-install-recommends tzdata

# Install hyperfine
RUN sudo apt install -y wget
RUN wget https://github.com/sharkdp/hyperfine/releases/download/v1.15.0/hyperfine_1.15.0_amd64.deb
RUN sudo dpkg -i hyperfine_1.15.0_amd64.deb
FROM effecthandlers/effect-handlers:base

# Install libmprompt/libmpeff
RUN sudo apt install -y wget git curl gcc make cmake
Expand Down
31 changes: 1 addition & 30 deletions systems/links/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,4 @@
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true

# Get the basic stuff
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y \
sudo

# Create ubuntu user with sudo privileges
RUN useradd -ms /bin/bash ubuntu && \
usermod -aG sudo ubuntu
# New added for disable sudo password
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

# Set as default user
USER ubuntu
WORKDIR /home/ubuntu

# Install hyperfine
RUN sudo apt install -y wget
RUN wget https://github.com/sharkdp/hyperfine/releases/download/v1.15.0/hyperfine_1.15.0_amd64.deb
RUN sudo dpkg -i hyperfine_1.15.0_amd64.deb

# Configure tzdata
RUN echo 'tzdata tzdata/Areas select Europe' | sudo debconf-set-selections
RUN echo 'tzdata tzdata/Zones/Europe select London' | sudo debconf-set-selections
RUN sudo apt-get install -qqy --no-install-recommends tzdata
FROM effecthandlers/effect-handlers:base

# Install OCaml
RUN sudo apt install -y wget git curl gcc make m4 unzip bubblewrap bzip2 pkg-config libgmp-dev
Expand Down
26 changes: 1 addition & 25 deletions systems/ocaml/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,4 @@
FROM ubuntu:22.04

ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true

# Get the basic stuff
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y \
sudo

# Create ubuntu user with sudo privileges
RUN useradd -ms /bin/bash ubuntu && \
usermod -aG sudo ubuntu
# New added for disable sudo password
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers

# Set as default user
USER ubuntu
WORKDIR /home/ubuntu

# Install hyperfine
RUN sudo apt install -y wget
RUN wget https://github.com/sharkdp/hyperfine/releases/download/v1.15.0/hyperfine_1.15.0_amd64.deb
RUN sudo dpkg -i hyperfine_1.15.0_amd64.deb
FROM effecthandlers/effect-handlers:base

# Install Multicore OCaml
RUN sudo apt install -y wget git curl gcc make m4 unzip bubblewrap bzip2
Expand Down
Loading