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 /home/stackage -p
17export DEBIAN_FRONTEND=noninteractive
19apt-get install -y software-properties-common
21add-apt-repository ppa:hvr/ghc -y
22add-apt-repository -y ppa:marutter/rrutter
23apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
24add-apt-repository -y --keyserver hkp://keyserver.ubuntu.com:80 'deb http://download.mono-project.com/repo/debian wheezy main'
25add-apt-repository -y --keyserver hkp://keyserver.ubuntu.com:80 'deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main'
26add-apt-repository -y --keyserver hkp://keyserver.ubuntu.com:80 'deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main'
43 ghc-$GHCVER-htmldocs \
57 libcurl4-openssl-dev \
67 libgirepository1.0-dev \
77 libgtksourceview-3.0-dev \
83 libjavascriptcoregtk-4.0-dev \
122 libwebkitgtk-3.0-dev \
141 python-mpltoolkits.basemap \
157curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
158curl https://packages.microsoft.com/config/debian/9/prod.list > /etc/apt/sources.list.d/mssql-release.list
160ACCEPT_EULA=Y apt-get install msodbcsql17 -y
162locale-gen en_US.UTF-8
164curl -sSL https://get.haskellstack.org/ | sh
166# Put documentation where we expect it
167mv /opt/ghc/$GHCVER/share/doc/ghc-$GHCVER/ /opt/ghc/$GHCVER/share/doc/ghc
169# llvm-5.0 for GHC (separate since it needs wget)
170wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
171 && add-apt-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main" \
173 && apt-get install -y llvm-5.0
175# llvm-6.0 for llvm-hs (separate since it needs wget)
176wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
177 && add-apt-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main" \
179 && apt-get install -y llvm-6.0
181# Buggy versions of ld.bfd fail to link some Haskell packages:
182# https://sourceware.org/bugzilla/show_bug.cgi?id=17689. Gold is
183# faster anyways and uses less RAM.
184update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 20
185update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.bfd" 10
187# GHC requires a specific LLVM version on the system PATH for its LLVM backend.
188# This version is tracked here:
189# https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM/Installing
191# GHC 8.4 requires LLVM 5.0 tools (specifically, llc-5.0 and opt-5.0).
192update-alternatives --install "/usr/bin/llc" "llc" "/usr/bin/llc-5.0" 50
193update-alternatives --install "/usr/bin/opt" "opt" "/usr/bin/opt-5.0" 50
195# Made sure a "node" binary is in the path, as well as "nodejs".
196# A historical naming collision on Debian means that the binary is called "nodejs",
197# but some tools like tsc still expect "node" to exist.
198ln -s /usr/bin/nodejs /usr/bin/node
200# install ocilib dependencies then build and install ocilib
202 && wget https://storage.googleapis.com/oracle.fpinsight.com/instantClient/oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \
203 && dpkg -i oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \
204 && rm -f oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \
205 && wget https://storage.googleapis.com/oracle.fpinsight.com/instantClient/oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \
206 && dpkg -i oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \
207 && rm -f oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \
208 && wget https://github.com/vrogier/ocilib/archive/v4.3.2.tar.gz \
209 && tar xvf v4.3.2.tar.gz \
210 && cd /tmp/ocilib-4.3.2 \
211 && ./configure --with-oracle-import=linkage \
212 --with-oracle-charset=ansi \
213 --with-oracle-headers-path=/usr/include/oracle/12.1/client64 \
214 --with-oracle-lib-path=/usr/lib/oracle/12.1/client64/lib \
218 && rm -rf /tmp/ocilib-4.3.2 \
219 && echo "/usr/local/lib" > /etc/ld.so.conf.d/usr-local.conf \
220 && echo "/usr/lib/oracle/12.1/client64/lib" > /etc/ld.so.conf.d/oracle-client.conf \
223# Add JDK to system paths.
224echo "/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/" > /etc/ld.so.conf.d/openjdk.conf \
227# Install erlang/otp platform and its dependencies
228ERLANG_VERSION="20.2.2"
229ERLANG_DEB_FILE="esl-erlang_${ERLANG_VERSION}-1~debian~jessie_amd64.deb"
231 && wget https://packages.erlang-solutions.com/erlang/esl-erlang/FLAVOUR_1_general/${ERLANG_DEB_FILE} \
232 && (dpkg -i ${ERLANG_DEB_FILE}; apt-get install -yf) \
233 && rm ${ERLANG_DEB_FILE} \
236# Install version 3 of the protobuf compiler. (The `protobuf-compiler` package only
237# supports version 2.)
238curl -OL https://github.com/google/protobuf/releases/download/v3.3.0/protoc-3.3.0-linux-x86_64.zip \
239 && sudo unzip -o protoc-3.3.0-linux-x86_64.zip -d /usr bin/protoc \
240 && rm -f protoc-3.3.0-linux-x84_64.zip
242# Install the TensorFlow C API.
243curl https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.1.0.tar.gz > libtensorflow.tar.gz \
244 && sudo tar zxf libtensorflow.tar.gz -C /usr \
245 && rm libtensorflow.tar.gz \
249curl https://download.libsodium.org/libsodium/releases/LATEST.tar.gz > libsodium.tar.gz \
250 && sudo tar xfz libsodium.tar.gz -C /tmp \
251 && rm libsodium.tar.gz \
252 && cd /tmp/libsodium-stable \
256# NOTE: also update Dockerfile when cuda version changes
257# Install CUDA toolkit
258# The current version can be found at: https://developer.nvidia.com/cuda-downloads
259CUDA_PKG=8.0.61-1 # update this on new version
260CUDA_VER=${CUDA_PKG:0:3}
261CUDA_APT=${CUDA_VER/./-}
264 && wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_${CUDA_PKG}_amd64.deb \
265 && dpkg -i cuda-repo-ubuntu1604_${CUDA_PKG}_amd64.deb \
266 && apt-get update -qq \
267 && 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} \
268 && rm cuda-repo-ubuntu1604_${CUDA_PKG}_amd64.deb \
269 && export CUDA_PATH=/usr/local/cuda-${CUDA_VER} \
270 && export LD_LIBRARY_PATH=${CUDA_PATH}/nvvm/lib64:${LD_LIBRARY_PATH+x} \
271 && export LD_LIBRARY_PATH=${CUDA_PATH}/lib64:${LD_LIBRARY_PATH} \
272 && export PATH=${CUDA_PATH}/bin:${PATH} \
275# non-free repo for mediabus-fdk-aac
276apt-add-repository multiverse \
278 && apt-get install -y nvidia-cuda-dev
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