Skip to content

Instantly share code, notes, and snippets.

@egormkn
Created May 20, 2020 18:43
Show Gist options
  • Save egormkn/43e9a86f8b76d3ccc9aa681bf5979bb3 to your computer and use it in GitHub Desktop.
Save egormkn/43e9a86f8b76d3ccc9aa681bf5979bb3 to your computer and use it in GitHub Desktop.
Lama Dockerfile
FROM ocaml/opam2:4.07
# Avoid warnings by switching to noninteractive
ENV DEBIAN_FRONTEND=noninteractive
# Install dependencies
RUN sudo apt-get update \
&& sudo apt-get install -y --no-install-recommends m4 gcc-multilib \
&& sudo rm -rf /var/lib/apt/lists/*
# Switch back to dialog for any ad-hoc use of apt-get
ENV DEBIAN_FRONTEND=dialog
# Set home directory
ARG HOME=/home/opam
# Create working directory
WORKDIR $HOME/lama
# Copy files
COPY --chown=opam:opam . .
# Configure and build project
RUN echo "source $HOME/.opam/opam-init/init.sh &> /dev/null" >> $HOME/.bashrc \
&& eval $(opam env) \
&& opam pin add -n ostap https://github.com/sign5/ostap.git#memoCPS \
&& opam pin add -y lama https://github.com/JetBrains-Research/Lama.git \
&& sudo chown opam:opam $HOME/lama \
&& make install \
&& opam clean
# Set home as working directory
WORKDIR $HOME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment