From d0e543fcb0897f587c88e99ece75b516aa7837c1 Mon Sep 17 00:00:00 2001 From: Roman Grundkiewicz Date: Wed, 14 Mar 2018 13:34:43 +0000 Subject: [PATCH] Add Installation section in docs/ --- _plugins/github_link_tag.rb | 2 ++ docs/index.md | 53 +++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/_plugins/github_link_tag.rb b/_plugins/github_link_tag.rb index 4428cc3b2..e907d7ae6 100644 --- a/_plugins/github_link_tag.rb +++ b/_plugins/github_link_tag.rb @@ -9,6 +9,8 @@ def initialize(tag_name, path, tokens) path.sub!(/\s*".*"\s*/, '') end @repo, @path = path.split('/', 2) + @repo.strip! unless @repo.nil? + @path.strip! unless @path.nil? end def render(context) diff --git a/docs/index.md b/docs/index.md index a0c2311e3..3881d3ab4 100644 --- a/docs/index.md +++ b/docs/index.md @@ -44,6 +44,59 @@ command line options): +## Installation + +Clone a fresh copy from github: + + git clone https://github.com/marian-nmt/marian + +The project is a standard CMake out-of-source build: + + cd marian + mkdir build + cd build + cmake .. + make -j + +If run for the first time, this will also download {% github_link marian-dev %} +--- the training framework for Marian. + +### Custom Boost + +Download, compile and install Boost: +``` +wget https://dl.bintray.com/boostorg/release/1.64.0/source/boost_1_64_0.tar.gz +tar zxvf boost_1_64_0.tar.gz +cd boost_1_64_0 +./bootstrap.sh +./b2 -j16 --prefix=$(pwd) --libdir=$(pwd)/lib64 --layout=system link=static install +``` + +To compile Marian training framework with your custom Boost installation: +``` +cd /path/to/marian-dev +mkdir build +cd build +cmake .. -DBOOST_ROOT=/path/to/boost_1_64_0 +make -j16 +``` + +Tested on Ubuntu 16.04.3 LTS. + +### Non-default CUDA + +Specify the path to your CUDA root directory via CMake: +``` +cd /path/to/marian-dev +mkdir build +cd build +cmake .. -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-9.1 +make -j16 + +``` + + + ## Training For training NMT models, you want to use `marian` command.