mirror of
https://github.com/HuwCampbell/grenade.git
synced 2024-11-29 03:31:58 +03:00
Added Dockerfile definition
This commit is contained in:
parent
f729b291e4
commit
13a8d6b335
49
Dockerfile
Normal file
49
Dockerfile
Normal 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
2
docker-compose.yml
Normal file
@ -0,0 +1,2 @@
|
||||
grenade:
|
||||
build: .
|
Loading…
Reference in New Issue
Block a user