@@ -13,11 +13,11 @@ Step 1: Install some build dependencies
1313.. code-block :: bash
1414
1515 $ apt-get update
16- $ apt-get install -y libgoogle-glog-dev curl build-essential cmake git automake libgmp3-dev libtool ssh libyaml-dev realpath wget valgrind software-properties-common unzip
16+ $ apt-get install -y libgoogle-glog-dev curl build-essential cmake git automake libgmp3-dev libtool ssh libyaml-dev realpath wget valgrind software-properties-common unzip libz-dev
1717
1818 .. note ::
1919
20- You might additionally need to install :code: `cmake3 ` and :code: ` libz-dev ` , if these packages are not found by apt-get, you can proceed otherwise install them by running :code: ` apt-get install libz-dev `
20+ You might additionally need to install :code: `cmake3 `, if this package is not found by apt-get, you can proceed.
2121
2222Step 2: Setup gcc / g++
2323^^^^^^^^^^^^^^^^^^^^^^^
@@ -70,10 +70,11 @@ Now, clone the repo, build and install LLVM+Tapir:
7070
7171 $ git clone --recursive https://github.com/wsmoses/Tapir-LLVM llvm
7272 $ mkdir -p ${LLVM_SOURCES} /llvm_build && cd ${LLVM_SOURCES} /llvm_build
73- $ ${CMAKE_VERSION} -DCMAKE_INSTALL_PREFIX=${CLANG_PREFIX} -DLLVM_TARGETS_TO_BUILD=X86 -DCOMPILER_RT_BUILD_CILKTOOLS=OFF -DLLVM_ENABLE_CXX1Y=ON -DLLVM_ENABLE_TERMINFO=OFF -DLLVM_BUILD_TESTS=OFF -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_RTTI=ON ../llvm/
73+ $ ${CMAKE_VERSION} -DLLVM_ENABLE_OCAMLDOC=OFF -DLLVM_INSTALL_OCAMLDOC_HTML_DIR=/tmp -DLLVM_OCAML_INSTALL_PATH=/tmp - DCMAKE_INSTALL_PREFIX=${CLANG_PREFIX} -DLLVM_TARGETS_TO_BUILD=X86 -DCOMPILER_RT_BUILD_CILKTOOLS=OFF -DLLVM_ENABLE_CXX1Y=ON -DLLVM_ENABLE_TERMINFO=OFF -DLLVM_BUILD_TESTS=OFF -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_ENABLE_RTTI=ON ../llvm/
7474 $ make -j $CORES -s && make install -j $CORES -s
7575 $ cd $HOME && rm -rf $LLVM_SOURCES
7676
77+
7778 Step 4: Get CUDA and CUDNN
7879^^^^^^^^^^^^^^^^^^^^^^^^^^
7980In order to build TC, you also need to have :code: `CUDA ` and :code: `CUDNN `. If you already have it
@@ -97,9 +98,14 @@ Now, Install cuDNN v6.0 (skip if you have it already):
9798 $ CUDNN_TAR_FILE=" cudnn-8.0-linux-x64-v6.0.tgz"
9899 $ wget http://developer.download.nvidia.com/compute/redist/cudnn/v6.0/${CUDNN_TAR_FILE}
99100 $ tar -xzvf ${CUDNN_TAR_FILE}
100- $ sudo cp -P cuda/include/cudnn.h /usr/local/cuda/include
101- $ sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda/lib64/
102- $ sudo chmod a+r /usr/local/cuda/lib64/libcudnn*
101+ $ cp -P cuda/include/cudnn.h /usr/local/cuda/include
102+ $ cp -P cuda/lib64/libcudnn* /usr/local/cuda/lib64/
103+ $ chmod a+r /usr/local/cuda/lib64/libcudnn*
104+
105+ .. note ::
106+
107+ Please use :code: `sudo ` to run the command that might fail with permission issues. Otherwise, run
108+ the commands as is.
103109
104110Set environment variables:
105111
@@ -118,7 +124,12 @@ to install the protobuf.
118124
119125 $ mkdir -p /tmp/proto-install && cd /tmp/proto-install
120126 $ wget --quiet https://github.com/google/protobuf/archive/v3.4.0.zip -O proto.zip && unzip -qq proto.zip -d .
121- $ cd protobuf-3.4.0 && ./autogen.sh && ./configure && make -j 8 && sudo make install && sudo ldconfig
127+ $ cd protobuf-3.4.0 && ./autogen.sh && ./configure && make -j 8 && make install && ldconfig
128+
129+ .. note ::
130+
131+ Please use :code: `sudo ` to run the command that might fail with permission issues. Otherwise, run
132+ the commands as is.
122133
123134Now check your proto version by running:
124135
@@ -136,7 +147,7 @@ dependencies and updating your Python:
136147
137148.. code-block :: bash
138149
139- $ sudo apt-get install -y python3-dev python3-pip python3-setuptools
150+ $ apt-get install -y python3-dev python3-pip python3-setuptools
140151 $ pip3 install --upgrade pip
141152 $ pip3 install numpy pyyaml
142153
0 commit comments