Install GHC via Stack

PPA does not yet include GHC 8.6.4
This commit is contained in:
Michael Snoyman 2019-03-06 04:48:31 +00:00
parent e364dd4e8f
commit a4b8cf4132
2 changed files with 17 additions and 16 deletions

View File

@ -2,9 +2,11 @@ FROM fpco/pid1:18.04
ENV HOME /home/stackage
ENV LANG en_US.UTF-8
ENV GHCVER 8.6.4
ENV GHCDIR /home/stackage/.stack/programs/x86_64-linux/ghc-$GHCVER
# NOTE: also update debian-bootstrap.sh when cuda version changes
ENV PATH /usr/local/cuda-10.0/bin:/opt/ghc/8.6.4/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV PATH /usr/local/cuda-10.0/bin:/home/stackage/.stack/programs/x86_64-linux/ghc-$GHCVER:/usr/sbin:/usr/bin:/sbin:/bin
ENV CUDA_PATH /usr/local/cuda-10.0
ADD debian-bootstrap.sh /tmp/debian-bootstrap.sh

View File

@ -10,13 +10,21 @@
# instructions, see:
# http://www.stackage.org/install
set -exu
set -exuo pipefail
mkdir -p /home/stackage
export LANG=C.UTF-8
export DEBIAN_FRONTEND=noninteractive
# Get curl
apt-get update
apt-get install -y curl
# Get Stack and GHC
curl -sSL https://get.haskellstack.org/ | sh -s - -d /usr/bin
stack setup --resolver ghc-$GHCVER
apt-get update
apt-get install -y \
@ -146,11 +154,6 @@ apt-get install -y \
zlib1g-dev \
zsh
GHCVER=8.6.4
add-apt-repository ppa:hvr/ghc -y
apt-get install -y ghc-$GHCVER ghc-$GHCVER-dyn ghc-$GHCVER-htmldocs ghc-$GHCVER-prof
# odbc
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list
@ -159,11 +162,6 @@ ACCEPT_EULA=Y apt-get install msodbcsql17 -y
locale-gen en_US.UTF-8
curl -sSL https://get.haskellstack.org/ | sh
# Put documentation where we expect it
mv /opt/ghc/$GHCVER/share/doc/ghc-$GHCVER/ /opt/ghc/$GHCVER/share/doc/ghc
# llvm-7.0 for llvm-hs (separate since it needs wget)
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
&& add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main" \
@ -258,10 +256,6 @@ apt-add-repository multiverse \
export CLANG_PURE_LLVM_LIB_DIR=/usr/lib/llvm-6.0/lib;
export CLANG_PURE_LLVM_INCLUDE_DIR=/usr/lib/llvm-6.0/include;
# finally run:
ldconfig
# EOF: don't build anything below this line
# protoc, for proto-lens-combinators test suite
# Instructions from: https://google.github.io/proto-lens/installing-protoc.html
PROTOC_ZIP=protoc-3.3.0-linux-x86_64.zip
@ -278,3 +272,8 @@ echo /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server > /etc/ld.so.conf.d/
echo /usr/lib/llvm-3.7/lib > /etc/ld.so.conf.d/llvm.conf
ldconfig
# EOF: don't build anything below this line
# Cleanup
apt-get clean
rm -rf /var/lib/apt/lists/*