Mentions légales du service

Skip to content
Snippets Groups Projects
index.html 5.84 KiB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <meta name="generator" content="pandoc" />
  <title></title>
  <style type="text/css">code{white-space: pre;}</style>
  <style type="text/css">
div.sourceCode { overflow-x: auto; }
table.sourceCode, tr.sourceCode, td.lineNumbers, td.sourceCode {
  margin: 0; padding: 0; vertical-align: baseline; border: none; }
table.sourceCode { width: 100%; line-height: 100%; }
td.lineNumbers { text-align: right; padding-right: 4px; padding-left: 4px; color: #aaaaaa; border-right: 1px solid #aaaaaa; }
td.sourceCode { padding-left: 5px; }
code > span.kw { color: #007020; font-weight: bold; } /* Keyword */
code > span.dt { color: #902000; } /* DataType */
code > span.dv { color: #40a070; } /* DecVal */
code > span.bn { color: #40a070; } /* BaseN */
code > span.fl { color: #40a070; } /* Float */
code > span.ch { color: #4070a0; } /* Char */
code > span.st { color: #4070a0; } /* String */
code > span.co { color: #60a0b0; font-style: italic; } /* Comment */
code > span.ot { color: #007020; } /* Other */
code > span.al { color: #ff0000; font-weight: bold; } /* Alert */
code > span.fu { color: #06287e; } /* Function */
code > span.er { color: #ff0000; font-weight: bold; } /* Error */
code > span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
code > span.cn { color: #880000; } /* Constant */
code > span.sc { color: #4070a0; } /* SpecialChar */
code > span.vs { color: #4070a0; } /* VerbatimString */
code > span.ss { color: #bb6688; } /* SpecialString */
code > span.im { } /* Import */
code > span.va { color: #19177c; } /* Variable */
code > span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code > span.op { color: #666666; } /* Operator */
code > span.bu { } /* BuiltIn */
code > span.ex { } /* Extension */
code > span.pp { color: #bc7a00; } /* Preprocessor */
code > span.at { color: #7d9029; } /* Attribute */
code > span.do { color: #ba2121; font-style: italic; } /* Documentation */
code > span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code > span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code > span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
  </style>
  <link rel="stylesheet" href="../github.css" type="text/css" />
</head>
<body>
<h1 id="themis-docker-image">THEMIS: Docker Image</h1>
<p>This folder builds a docker image with all needed dependencies to run build and execute all artifacts. Additionally, the docker provides a server to browse the <code>README.md</code> files.</p>
<p>Firstly, make sure you are in the <a href=".">docker</a> folder:</p>
<div class="sourceCode"><pre class="sourceCode bash"><code class="sourceCode bash"><span class="bu">cd</span> docker</code></pre></div>
<h2 id="creating-and-running-the-image">Creating and Running the Image</h2>
<p>The following instructions manipulate the docker container, please make sure to have <strong>root</strong> privileges (if necessary) for docker commands.</p>
<h3 id="using-gnu-make">Using GNU Make</h3>
<ul>
<li>Build the docker image (~ 30 minutes)</li>
</ul>
<pre><code># make build</code></pre>
<ul>
<li>Bind all the artifacts to the running docker image and launch a shell in the docker container</li>
</ul>
<pre><code># make run</code></pre>
<ul>
<li>Proceed to: <a href="#after-running">after running</a>.</li>
</ul>
<h3 id="without-gnu-make">Without GNU Make</h3>
<ul>
<li>Build the docker image (~ 30 minutes)</li>
</ul>
<pre><code># docker build --force-rm=true  -t themis-artifact .</code></pre>
<ul>
<li>Run the docker image</li>
</ul>
<pre><code># docker run --rm -p 8050:8050 -p 8051:8051  -i -v `pwd`/../:/home/user/themis/:rw -t themis-artifact</code></pre>
<h2 id="after-running">After Running</h2>
<ul>
<li>It is now possible to use a regular file explorer and programs to browse the files in the directory in parallel, changes done in the docker reflect on the files directly (outside docker).</li>
</ul>
<blockquote>
<p><strong>Note:</strong> The docker image mounts all the artifacts (as volumes) in read-write mode, changes done in the docker container will reflect in the original folder.</p>
</blockquote>
<ul>
<li>You can now also browse the documentation using a browser:</li>
</ul>
<ol style="list-style-type: decimal">
<li>Using the pre-rendered files: <a href="http://localhost:8050">http://localhost:8050/</a></li>
<li>Using the live-renderer to render the files: <a href="http://localhost:8051">http://localhost:8051/</a></li>
</ol>
<h2 id="changing-the-artifacts-mountpoints">Changing the Artifacts Mountpoints</h2>
<p>The default artifacts are mounted from the parent directory, i.e.: <a href="/"><code>..</code></a>, the docker image will mount the following:</p>
<ul>
<li><a href="../experiments" class="uri">../experiments</a> -&gt; <code>/home/user/themis/experiments</code></li>
<li><a href="../example" class="uri">../example</a> -&gt; <code>/home/user/themis/example</code></li>
<li><a href="../plot" class="uri">../plot</a> -&gt; <code>/home/user/themis/plot</code></li>
<li><a href="../source" class="uri">../source</a> -&gt; <code>/home/user/themis/source</code></li>
</ul>
<p>If you wish to use a different workdir than <a href="../"><code>..</code></a>, it must be an absolute path in the form of <code>/path/to/workdir</code>.</p>
<p>To do so, simply provide the path with <code>WD</code> as follows:</p>
<pre><code># make run WD=/path/to/workdir</code></pre>
<h2 id="deleting-the-image">Deleting the Image</h2>
<p>Once done with using the docker image, delete the created docker processes and images relevant to THEMIS by running:</p>
<pre><code># make clean</code></pre>
</body>
</html>