Added Dockerfile definition

This commit is contained in:
Leonardo Piñeyro 2019-02-20 22:44:25 -03:00
parent f729b291e4
commit 13a8d6b335
2 changed files with 51 additions and 0 deletions

49
Dockerfile Normal file
View File

@ -0,0 +1,49 @@
#
# NOTE: Tried with Haskell 8.2 and 8.0 and ended up with some build errors
#
FROM haskell:8.4
RUN mkdir /grenade
COPY . /grenade
#
# Install system dependencies
#
RUN apt-get update && apt-get install -y \
build-essential \
gfortran \
libatlas-base-dev \
libgsl0-dev \
liblapack-dev \
python \
wget
#
# Install Open Blas (with Lapack included)
# This is a depencency for building hmatrix package
#
ENV OPEN_BLAS_VER=0.2.20
RUN wget http://github.com/xianyi/OpenBLAS/archive/v$OPEN_BLAS_VER.tar.gz
RUN tar -xzvf v$OPEN_BLAS_VER.tar.gz
WORKDIR /OpenBLAS-$OPEN_BLAS_VER
RUN ls -la
RUN make FC=gfortran
RUN make PREFIX=/usr/local install
#
# Build and setup grenade
#
WORKDIR /grenade
RUN stack init
RUN stack setup --install-ghc
RUN stack build
# Optional GHCI prompt configuration
RUN echo ':set prompt "\ESC[34mλ> \ESC[m"' > ~/.ghci
#
# Run GHC repl
#
CMD [ "stack", "ghci" ]

2
docker-compose.yml Normal file
View File

@ -0,0 +1,2 @@
grenade:
build: .