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/fpco/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'
41 ghc-$GHCVER-htmldocs \
54 libcurl4-openssl-dev \
64 libgirepository1.0-dev \
74 libgtksourceview-3.0-dev \
117 libwebkitgtk-3.0-dev \
135 python-mpltoolkits.basemap \
149locale-gen en_US.UTF-8
151curl -sSL https://get.haskellstack.org/ | sh
153# Put documentation where we expect it
154mv /opt/ghc/$GHCVER/share/doc/ghc-$GHCVER/ /opt/ghc/$GHCVER/share/doc/ghc
156# Buggy versions of ld.bfd fail to link some Haskell packages:
157# https://sourceware.org/bugzilla/show_bug.cgi?id=17689. Gold is
158# faster anyways and uses less RAM.
159update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.gold" 20
160update-alternatives --install "/usr/bin/ld" "ld" "/usr/bin/ld.bfd" 10
162# GHC requires a specific LLVM version on the system PATH for its LLVM backend.
163# This version is tracked here:
164# https://ghc.haskell.org/trac/ghc/wiki/Commentary/Compiler/Backends/LLVM/Installing
166# GHC 8.2 requires LLVM 3.9 tools (specifically, llc-3.9 and opt-3.9).
167update-alternatives --install "/usr/bin/llc" "llc" "/usr/bin/llc-3.9" 50
168update-alternatives --install "/usr/bin/opt" "opt" "/usr/bin/opt-3.9" 50
170# install ocilib dependencies then build and install ocilib
172 && wget https://storage.googleapis.com/oracle.fpinsight.com/instantClient/oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \
173 && dpkg -i oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \
174 && rm -f oracle-instantclient12.1-basiclite_12.1.0.2.0-2_amd64.deb \
175 && wget https://storage.googleapis.com/oracle.fpinsight.com/instantClient/oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \
176 && dpkg -i oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \
177 && rm -f oracle-instantclient12.1-devel_12.1.0.2.0-2_amd64.deb \
178 && wget https://github.com/vrogier/ocilib/archive/v4.3.2.tar.gz \
179 && tar xvf v4.3.2.tar.gz \
180 && cd /tmp/ocilib-4.3.2 \
181 && ./configure --with-oracle-import=linkage \
182 --with-oracle-charset=ansi \
183 --with-oracle-headers-path=/usr/include/oracle/12.1/client64 \
184 --with-oracle-lib-path=/usr/lib/oracle/12.1/client64/lib \
188 && rm -rf /tmp/ocilib-4.3.2 \
189 && echo "/usr/local/lib" > /etc/ld.so.conf.d/usr-local.conf \
190 && echo "/usr/lib/oracle/12.1/client64/lib" > /etc/ld.so.conf.d/oracle-client.conf \
193# Add JDK to system paths.
194echo "/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server/" > /etc/ld.so.conf.d/openjdk.conf \
197# llvm-4.0 for llvm-hs (separate since it needs wget)
198wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
199 && add-apt-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-5.0 main" \
201 && apt-get install -y llvm-5.0
203# Install version 3 of the protobuf compiler. (The `protobuf-compiler` package only
204# supports version 2.)
205curl -OL https://github.com/google/protobuf/releases/download/v3.3.0/protoc-3.3.0-linux-x86_64.zip \
206 && sudo unzip -o protoc-3.3.0-linux-x86_64.zip -d /usr bin/protoc \
207 && rm -f protoc-3.3.0-linux-x84_64.zip
209# Install the TensorFlow C API.
210curl https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-1.1.0.tar.gz > libtensorflow.tar.gz \
211 && sudo tar zxf libtensorflow.tar.gz -C /usr \
212 && rm libtensorflow.tar.gz \
215# NOTE: also update Dockerfile when cuda version changes
216# Install CUDA toolkit
217# The current version can be found at: https://developer.nvidia.com/cuda-downloads
218CUDA_PKG=8.0.61-1 # update this on new version
219CUDA_VER=${CUDA_PKG:0:3}
220CUDA_APT=${CUDA_VER/./-}
223 && wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_${CUDA_PKG}_amd64.deb \
224 && dpkg -i cuda-repo-ubuntu1604_${CUDA_PKG}_amd64.deb \
225 && apt-get update -qq \
226 && 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} \
227 && rm cuda-repo-ubuntu1604_${CUDA_PKG}_amd64.deb \
228 && export CUDA_PATH=/usr/local/cuda-${CUDA_VER} \
229 && export LD_LIBRARY_PATH=${CUDA_PATH}/nvvm/lib64:${LD_LIBRARY_PATH+x} \
230 && export LD_LIBRARY_PATH=${CUDA_PATH}/lib64:${LD_LIBRARY_PATH} \
231 && export PATH=${CUDA_PATH}/bin:${PATH} \
234# non-free repo for mediabus-fdk-aac
235apt-add-repository multiverse \
237 && 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