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 unzip
28curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
30./aws/install --bin-dir /usr/bin
35curl -sSL https://get.haskellstack.org/ | sh -s - -d /usr/bin
36stack setup --resolver ghc-$GHCVER
63 libcurl4-openssl-dev \
65 libdbusmenu-glib-dev \
66 libdbusmenu-gtk3-dev \
75 libgirepository1.0-dev \
86 libgtksourceview-3.0-dev \
92 libjavascriptcoregtk-4.0-dev \
140 libwebkitgtk-3.0-dev \
159 python-mpltoolkits.basemap \
168 software-properties-common \
179curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
180curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list
182ACCEPT_EULA=Y apt-get install msodbcsql17 -y
185curl https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
186add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main"
188apt-get install llvm-9-dev -y
190locale-gen en_US.UTF-8
192# Buggy versions of ld.bfd fail to link some Haskell packages:
193# https://sourceware.org/bugzilla/show_bug.cgi?id=17689. Gold is
194# faster anyways and uses less RAM.
195update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 20
196update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.bfd" 10
198# GHC requires a specific LLVM version on the system PATH for its LLVM backend.
199# This version is tracked here:
200# https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM/Installing
202# GHC 8.10 requires LLVM 9 tools (?) (specifically, llc-9 and opt-9).
203update-alternatives --install "/usr/bin/llc" "llc" "/usr/bin/llc-9" 50
204update-alternatives --install "/usr/bin/opt" "opt" "/usr/bin/opt-9" 50
206# nodejs 10 (nodejs8 in bionic needs conflicting libssl10-dev)
207curl -sL https://deb.nodesource.com/setup_10.x | bash -
208apt-get install -y nodejs
210# install ocilib dependencies then build and install ocilib
212 && wget https://storage.googleapis.com/oracle.fpinsight.com/instantClient/oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \
213 && dpkg -i oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \
214 && rm -f oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \
215 && wget https://storage.googleapis.com/oracle.fpinsight.com/instantClient/oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \
216 && dpkg -i oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \
217 && rm -f oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \
218 && wget https://github.com/vrogier/ocilib/archive/v4.3.2.tar.gz \
219 && tar xvf v4.3.2.tar.gz \
220 && cd /tmp/ocilib-4.3.2 \
221 && ./configure --with-oracle-import=linkage \
222 --with-oracle-charset=ansi \
223 --with-oracle-headers-path=/usr/include/oracle/12.1/client64 \
224 --with-oracle-lib-path=/usr/lib/oracle/12.1/client64/lib \
228 && rm -rf /tmp/ocilib-4.3.2 \
229 && echo "/usr/local/lib" > /etc/ld.so.conf.d/usr-local.conf \
230 && echo "/usr/lib/oracle/12.1/client64/lib" > /etc/ld.so.conf.d/oracle-client.conf \
233# Add JDK to system paths.
234echo "/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/" > /etc/ld.so.conf.d/openjdk.conf \
237# Install erlang/otp platform and its dependencies
238ERLANG_DEB_FILE="esl-erlang_21.1-1~ubuntu~bionic_amd64.deb"
240 && wget https://packages.erlang-solutions.com/erlang/debian/pool/${ERLANG_DEB_FILE} \
241 && (dpkg -i ${ERLANG_DEB_FILE}; apt-get install -yf) \
242 && rm ${ERLANG_DEB_FILE} \
245# Install the TensorFlow C API.
246curl https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.1.0.tar.gz > libtensorflow.tar.gz \
247 && sudo tar zxf libtensorflow.tar.gz -C /usr \
248 && rm libtensorflow.tar.gz \
251# NOTE: also update Dockerfile when cuda version changes
252# Install CUDA toolkit
253# The current version can be found at: https://developer.nvidia.com/cuda-downloads
259 && wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_${CUDA_PKG}_amd64.deb \
260 && apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub \
261 && dpkg -i cuda-repo-ubuntu1804_${CUDA_PKG}_amd64.deb \
262 && apt-get update -qq \
263 && 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} \
264 && rm cuda-repo-ubuntu1804_${CUDA_PKG}_amd64.deb \
265 && export CUDA_PATH=/usr/local/cuda-${CUDA_VER} \
266 && export LD_LIBRARY_PATH=${CUDA_PATH}/nvvm/lib64:${LD_LIBRARY_PATH+x} \
267 && export LD_LIBRARY_PATH=${CUDA_PATH}/lib64:${LD_LIBRARY_PATH} \
268 && export PATH=${CUDA_PATH}/bin:${PATH} \
271# non-free repo for mediabus-fdk-aac
272apt-add-repository multiverse \
274 && apt-get install -y nvidia-cuda-dev
276export CLANG_PURE_LLVM_LIB_DIR=/usr/lib/llvm-9/lib;
277export CLANG_PURE_LLVM_INCLUDE_DIR=/usr/lib/llvm-9/include;
279# protoc, for proto-lens-combinators test suite
280# Instructions from: https://google.github.io/proto-lens/installing-protoc.html
281PROTOC_ZIP=protoc-3.3.0-linux-x86_64.zip
282curl -OL https://github.com/google/protobuf/releases/download/v3.3.0/$PROTOC_ZIP
283sudo unzip -o $PROTOC_ZIP -d /usr bin/protoc
286# Update library search paths
287echo /usr/local/cuda-10.0/lib64 > /etc/ld.so.conf.d/cuda.conf
288echo /usr/local/cuda-10.0/nvvm/lib64 >> /etc/ld.so.conf.d/cuda.conf
290echo /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server > /etc/ld.so.conf.d/java.conf
292echo /usr/lib/llvm-3.7/lib > /etc/ld.so.conf.d/llvm.conf
296# Install librdkafka (Apache Kafka C/C++ library)
297wget -qO - https://packages.confluent.io/deb/5.2/archive.key | apt-key add -
298add-apt-repository "deb https://packages.confluent.io/deb/5.2 stable main"
299apt-get update && apt install -y librdkafka-dev
302curl -L https://github.com/WebAssembly/binaryen/archive/version_94.tar.gz | tar xz -C /tmp
303pushd /tmp/binaryen-version_94
307 -DCMAKE_BUILD_TYPE=Release \
308 -DCMAKE_INSTALL_PREFIX=/usr \
309 -G "Unix Makefiles" \
317 && wget https://github.com/Z3Prover/z3/releases/download/z3-${Z3_VER}/z3-${Z3_VER}-x64-ubuntu-16.04.zip \
318 && unzip z3-${Z3_VER}-x64-ubuntu-16.04.zip \
319 && rm z3-${Z3_VER}-x64-ubuntu-16.04.zip \
320 && ln -s /usr/local/z3-${Z3_VER}-x64-ubuntu-16.04/bin/z3 /usr/bin/z3
326 && wget https://github.com/benmcollins/libjwt/archive/v${LIBJWT_VER}.zip \
327 && unzip v${LIBJWT_VER}.zip \
328 && pushd libjwt-${LIBJWT_VER} \
330 && ./configure --disable-valgrind --disable-doxygen-doc --prefix /usr \
332 && sudo make install \
338# EOF: don't build anything below this line
342rm -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