Add shared docker image for discord-bot and playground.

This commit is contained in:
David Himmelstrup 2020-10-28 16:49:36 +08:00
commit eca9226126

34
Dockerfile.base Normal file
View file

@ -0,0 +1,34 @@
FROM haskell:8.8.4
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
PATH=/root/.local/bin:$PATH \
CUDA_PATH=/usr/local/cuda-$CUDA_VERSION \
CPATH=$JVM_PATH/include:$JVM_PATH/include/linux:$LLVM_PATH/include \
DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
libblas-dev liblapack-dev ffmpeg \
curl blender povray texlive texlive-latex-base texlive-latex-extra \
texlive-fonts-extra texlive-science texlive-xetex \
texlive-latex-recommended texlive-lang-english \
texlive-lang-chinese texlive-plain-generic \
unzip
WORKDIR /src
# Install reanimate dependencies and cache the layer
ADD reanimate.cabal stack.yaml ./
RUN stack build --only-dependencies --no-install-ghc --system-ghc --haddock
# Add source after dependencies have been installed as to not invalidate the caches
ADD data data
ADD src src
ADD .git .git
ADD viewer-elm viewer-elm
ADD Setup.hs ./
# Build reanimate
RUN stack build --no-install-ghc --system-ghc