Created
May 20, 2020 18:43
-
-
Save egormkn/43e9a86f8b76d3ccc9aa681bf5979bb3 to your computer and use it in GitHub Desktop.
Lama Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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