From c920936861eca38483c69794ccabd6a5f94d1f1a Mon Sep 17 00:00:00 2001 From: Darius Foo Date: Mon, 27 May 2024 15:55:36 +0800 Subject: [PATCH] Docker artifact --- Dockerfile | 18 ++++++++++++++++++ README.md | 1 + docs/docker.md | 7 +++++++ heifer | 4 ++++ 4 files changed, 30 insertions(+) create mode 100644 Dockerfile create mode 100644 docs/docker.md create mode 100755 heifer diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..eee7f2cc --- /dev/null +++ b/Dockerfile @@ -0,0 +1,18 @@ + +FROM ocaml/opam:ubuntu-23.04-ocaml-5.1 + +RUN opam update + +RUN git clone https://github.com/songyahui/AlgebraicEffect.git + +WORKDIR AlgebraicEffect + +RUN sudo apt-get update -y && sudo apt-get install -y libgmp-dev pkg-config python3 + +RUN opam install dune menhir ppx_deriving ppx_expect unionFind visitors z3 + +RUN sudo apt-get install -y libcairo2-dev libexpat1-dev libgtk-3-dev libgtksourceview-3.0-dev +RUN opam install why3-ide + +RUN eval $(opam env) && dune build @install +ENV PATH $PWD:$PATH \ No newline at end of file diff --git a/README.md b/README.md index 3fb3bdca..10c31091 100644 --- a/README.md +++ b/README.md @@ -53,4 +53,5 @@ dune exec parsing/hip.exe src/demo/8_schduler.ml - [Development](docs/development.md) - [Why3](docs/why3.md) - [How the web build works](docs/web.md) +- [Docker packaging](docs/docker.md) diff --git a/docs/docker.md b/docs/docker.md new file mode 100644 index 00000000..36d1fbd7 --- /dev/null +++ b/docs/docker.md @@ -0,0 +1,7 @@ + +# Docker packaging + +```sh +docker build -t heifer-icfp24 -f Dockerfile . --progress=plain +docker run -it heifer-icfp24 bash +``` diff --git a/heifer b/heifer new file mode 100755 index 00000000..87a1c304 --- /dev/null +++ b/heifer @@ -0,0 +1,4 @@ +#!/bin/sh + +set -x +dune exec parsing/hip.exe "$@" \ No newline at end of file