blob: 5875402a4cfaf0c4c537b2cf73fa88b3130ec3ea [file] [log] [blame]
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Creating a new engine &mdash; Apache Marvin-AI 0.0.5 documentation</title>
<script type="text/javascript" src="../_static/js/modernizr.min.js"></script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="../_static/language_data.js"></script>
<script type="text/javascript" src="../_static/js/theme.js"></script>
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="Community" href="community.html" />
<link rel="prev" title="Install Apache Marvin-AI" href="install-marvin.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="../index.html" class="icon icon-home"> Apache Marvin-AI
</a>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<p class="caption"><span class="caption-text">Contents:</span></p>
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="overview-marvin.html">Overview</a></li>
<li class="toctree-l1"><a class="reference internal" href="main-components.html">Main Components</a></li>
<li class="toctree-l1"><a class="reference internal" href="install-marvin.html">Install Apache Marvin-AI</a></li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">Creating a new engine</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#macos-install">MacOS Install</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="community.html">Community</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../index.html">Apache Marvin-AI</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../index.html">Docs</a> &raquo;</li>
<li>Creating a new engine</li>
<li class="wy-breadcrumbs-aside">
<a href="../_sources/pages/get-started.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="creating-a-new-engine">
<h1>Creating a new engine<a class="headerlink" href="#creating-a-new-engine" title="Permalink to this headline"></a></h1>
<p>In this chapter we have some exemples of how to create and work with an engine.</p>
<ol class="arabic">
<li><p>To create a new engine:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ workon python-toolbox-env
$ marvin engine-generate
</pre></div>
</div>
</li>
</ol>
<p>Respond the interactive prompt and wait for the engine environment preparation, and don’t forget to start dev box before if you are using vagrant.</p>
<ol class="arabic" start="2">
<li><p>Test the new engine:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ workon &lt;new_engine_name&gt;-env
$ marvin
</pre></div>
</div>
</li>
<li><p>For more informations:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ marvin --help
</pre></div>
</div>
</li>
<li><p>Youtube Tutorial</p></li>
</ol>
<iframe width="560" height="315" src="https://www.youtube.com/embed/p7yiLh2uLlQ" frameborder="0" allowfullscreen></iframe><div class="section" id="macos-install">
<h2>MacOS Install<a class="headerlink" href="#macos-install" title="Permalink to this headline"></a></h2>
<p>Toolbox will need some OS dependencies:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ sudo easy_install pip
$ brew install openssl graphviz
</pre></div>
</div>
<p>We strongly recommend the use of VirtualEnv and VirtualEnvWrapper:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ sudo pip install --upgrade pip
$ sudo pip install virtualenvwrapper --ignore-installed six
</pre></div>
</div>
<p>Spark installation (Optional):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ curl https://d3kbcqa49mib13.cloudfront.net/spark-2.1.1-bin-hadoop2.6.tgz -o /tmp/spark-2.1.1-bin-hadoop2.6.tgz
$ sudo tar -xf /tmp/spark-2.1.1-bin-hadoop2.6.tgz -C /opt/
$ sudo ln -s /opt/spark-2.1.1-bin-hadoop2.6 /opt/spark
$ echo &quot;export SPARK_HOME=/opt/spark&quot; &gt;&gt; $HOME/.bash_profile
</pre></div>
</div>
<p>If you do not have /opt directory created, before unpacking spark, run:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ sudo mkdir /opt
</pre></div>
</div>
<p>Marvin uses dafault values for these environment variables, but you can customize them (Optional):</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ echo &quot;export WORKON_HOME=$HOME/.virtualenvs&quot; &gt;&gt; $HOME/.bash_profile
$ echo &quot;export MARVIN_HOME=$HOME/marvin&quot; &gt;&gt; $HOME/.bash_profile
$ echo &quot;export MARVIN_DATA_PATH=$HOME/marvin/data&quot; &gt;&gt; $HOME/.bash_profile
$ echo &quot;source virtualenvwrapper.sh&quot; &gt;&gt; $HOME/.bash_profile
$ source ~/.bash_profile
</pre></div>
</div>
<p>Install python-toolbox:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ mkvirtualenv python-toolbox-env
$ setvirtualenvproject
$ pip install marvin-python-toolbox
</pre></div>
</div>
<p>Test the installation:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span>$ marvin
</pre></div>
</div>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="community.html" class="btn btn-neutral float-right" title="Community" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="install-marvin.html" class="btn btn-neutral float-left" title="Install Apache Marvin-AI" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
&copy; Copyright 2019, Bruno Sette
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>