3# Work in progress: create a list of commands necessary to get Stackage
4# up-and-running on a freshly installed Debian-based system (including Ubuntu).
7# wget -O - https://raw.github.com/commercialhaskell/stackage/master/debian-bootstrap.sh | bash -ex
9# NOTE: Requires that GHC and Cabal are installed and on your PATH. For
11# http://www.stackage.org/install
15mkdir -p /home/stackage
18export DEBIAN_FRONTEND=noninteractive
22apt-get install -y curl
25curl -sSL https://get.haskellstack.org/ | sh -s - -d /usr/bin
26stack setup --resolver ghc-$GHCVER
52 libcurl4-openssl-dev \
62 libgirepository1.0-dev \
72 libgtksourceview-3.0-dev \
78 libjavascriptcoregtk-4.0-dev \
123 libwebkitgtk-3.0-dev \
140 python-mpltoolkits.basemap \
147 software-properties-common \
158curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
159curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list
161ACCEPT_EULA=Y apt-get install msodbcsql17 -y
163locale-gen en_US.UTF-8
165# llvm-7.0 for llvm-hs (separate since it needs wget)
166wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
167 && add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-7 main" \
169 && apt-get install -y llvm-7
171# Buggy versions of ld.bfd fail to link some Haskell packages:
172# https://sourceware.org/bugzilla/show_bug.cgi?id=17689. Gold is
173# faster anyways and uses less RAM.
174update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 20
175update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.bfd" 10
177# GHC requires a specific LLVM version on the system PATH for its LLVM backend.
178# This version is tracked here:
179# https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM/Installing
181# GHC 8.6 requires LLVM 6.0 tools (specifically, llc-6.0 and opt-6.0).
182update-alternatives --install "/usr/bin/llc" "llc" "/usr/bin/llc-6.0" 50
183update-alternatives --install "/usr/bin/opt" "opt" "/usr/bin/opt-6.0" 50
185# nodejs 10 (nodejs8 in bionic needs conflicting libssl10-dev)
186curl -sL https://deb.nodesource.com/setup_10.x | bash -
187apt-get install -y nodejs
189# install ocilib dependencies then build and install ocilib
191 && wget https://storage.googleapis.com/oracle.fpinsight.com/instantClient/oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \
192 && dpkg -i oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \
193 && rm -f oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \
194 && wget https://storage.googleapis.com/oracle.fpinsight.com/instantClient/oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \
195 && dpkg -i oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \
196 && rm -f oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \
197 && wget https://github.com/vrogier/ocilib/archive/v4.3.2.tar.gz \
198 && tar xvf v4.3.2.tar.gz \
199 && cd /tmp/ocilib-4.3.2 \
200 && ./configure --with-oracle-import=linkage \
201 --with-oracle-charset=ansi \
202 --with-oracle-headers-path=/usr/include/oracle/12.1/client64 \
203 --with-oracle-lib-path=/usr/lib/oracle/12.1/client64/lib \
207 && rm -rf /tmp/ocilib-4.3.2 \
208 && echo "/usr/local/lib" > /etc/ld.so.conf.d/usr-local.conf \
209 && echo "/usr/lib/oracle/12.1/client64/lib" > /etc/ld.so.conf.d/oracle-client.conf \
212# Add JDK to system paths.
213echo "/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/" > /etc/ld.so.conf.d/openjdk.conf \
216# Install erlang/otp platform and its dependencies
217ERLANG_VERSION="20.2.2"
218ERLANG_DEB_FILE="esl-erlang_21.2-1~ubuntu~bionic_amd64.deb"
220 && wget http://packages.erlang-solutions.com/site/esl/esl-erlang/FLAVOUR_1_general/${ERLANG_DEB_FILE} \
221 && (dpkg -i ${ERLANG_DEB_FILE}; apt-get install -yf) \
222 && rm ${ERLANG_DEB_FILE} \
225# Install the TensorFlow C API.
226curl https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.1.0.tar.gz > libtensorflow.tar.gz \
227 && sudo tar zxf libtensorflow.tar.gz -C /usr \
228 && rm libtensorflow.tar.gz \
231# NOTE: also update Dockerfile when cuda version changes
232# Install CUDA toolkit
233# The current version can be found at: https://developer.nvidia.com/cuda-downloads
239 && wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_${CUDA_PKG}_amd64.deb \
240 && apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub \
241 && dpkg -i cuda-repo-ubuntu1804_${CUDA_PKG}_amd64.deb \
242 && apt-get update -qq \
243 && apt-get install -y cuda-drivers cuda-core-${CUDA_APT} cuda-cudart-dev-${CUDA_APT} cuda-cufft-dev-${CUDA_APT} cuda-cublas-dev-${CUDA_APT} cuda-cusparse-dev-${CUDA_APT} cuda-cusolver-dev-${CUDA_APT} \
244 && rm cuda-repo-ubuntu1804_${CUDA_PKG}_amd64.deb \
245 && export CUDA_PATH=/usr/local/cuda-${CUDA_VER} \
246 && export LD_LIBRARY_PATH=${CUDA_PATH}/nvvm/lib64:${LD_LIBRARY_PATH+x} \
247 && export LD_LIBRARY_PATH=${CUDA_PATH}/lib64:${LD_LIBRARY_PATH} \
248 && export PATH=${CUDA_PATH}/bin:${PATH} \
251# non-free repo for mediabus-fdk-aac
252apt-add-repository multiverse \
254 && apt-get install -y nvidia-cuda-dev
256export CLANG_PURE_LLVM_LIB_DIR=/usr/lib/llvm-6.0/lib;
257export CLANG_PURE_LLVM_INCLUDE_DIR=/usr/lib/llvm-6.0/include;
259# protoc, for proto-lens-combinators test suite
260# Instructions from: https://google.github.io/proto-lens/installing-protoc.html
261PROTOC_ZIP=protoc-3.3.0-linux-x86_64.zip
262curl -OL https://github.com/google/protobuf/releases/download/v3.3.0/$PROTOC_ZIP
263sudo unzip -o $PROTOC_ZIP -d /usr bin/protoc
266# Update library search paths
267echo /usr/local/cuda-10.0/lib64 > /etc/ld.so.conf.d/cuda.conf
268echo /usr/local/cuda-10.0/nvvm/lib64 >> /etc/ld.so.conf.d/cuda.conf
270echo /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server > /etc/ld.so.conf.d/java.conf
272echo /usr/lib/llvm-3.7/lib > /etc/ld.so.conf.d/llvm.conf
275# EOF: don't build anything below this line
279rm -rf /var/lib/apt/lists/*
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list