Skip to content
Snippets Groups Projects
Commit cce41036 authored by Gerardo Tauriello's avatar Gerardo Tauriello
Browse files

SCHWED-4563: clarified Singularity setup and added example.

parent 48195358
No related branches found
No related tags found
No related merge requests found
......@@ -36,6 +36,8 @@ Fire the local Registry and push the promod image to it:
sudo docker tag promod localhost:5000/promod
sudo docker push localhost:5000/promod
If port 5000 is already taken on your machine, use a different ``<PORT>`` by
using the flag ``-p <PORT>:5000`` and ``localhost:<PORT>`` in these commands.
Make sure, that on top of your Singularity recipe you have something like:
.. code-block:: bash
......@@ -71,7 +73,24 @@ To get help on how to run it:
.. code-block:: bash
singularity run --app Notebook <IMAGE> --help
singularity help --app Notebook <IMAGE>
Within the notebook you can test OST, ProMod3 and nglview as follows:
.. code-block:: python
from ost import io
from promod3 import loop
import nglview
# generate backbone with dihedrals of a helix and store it
sequence = "HELLYEAH"
bb_list = loop.BackboneList(sequence)
io.SavePDB(bb_list.ToEntity(), "test.pdb")
# display stored file
view = nglview.show_file("test.pdb")
view
The Compound Library
......
......@@ -36,6 +36,8 @@ Fire the local Registry and push the promod image to it:
sudo docker tag promod localhost:5000/promod
sudo docker push localhost:5000/promod
If port 5000 is already taken on your machine, use a different ``<PORT>`` by
using the flag ``-p <PORT>:5000`` and ``localhost:<PORT>`` in these commands.
Make sure, that on top of your Singularity recipe you have something like:
.. code-block:: bash
......@@ -71,7 +73,24 @@ To get help on how to run it:
.. code-block:: bash
singularity run --app Notebook <IMAGE> --help
singularity help --app Notebook <IMAGE>
Within the notebook you can test OST, ProMod3 and nglview as follows:
.. code-block:: python
from ost import io
from promod3 import loop
import nglview
# generate backbone with dihedrals of a helix and store it
sequence = "HELLYEAH"
bb_list = loop.BackboneList(sequence)
io.SavePDB(bb_list.ToEntity(), "test.pdb")
# display stored file
view = nglview.show_file("test.pdb")
view
The Compound Library
......
......@@ -57,7 +57,9 @@ sudo docker tag promod localhost:5000/promod
sudo docker push localhost:5000/promod
</pre></div>
</div>
<p>Make sure, that on top of your Singularity recipe you have something like:</p>
<p>If port 5000 is already taken on your machine, use a different <code class="docutils literal"><span class="pre">&lt;PORT&gt;</span></code> by
using the flag <code class="docutils literal"><span class="pre">-p</span> <span class="pre">&lt;PORT&gt;:5000</span></code> and <code class="docutils literal"><span class="pre">localhost:&lt;PORT&gt;</span></code> in these commands.
Make sure, that on top of your Singularity recipe you have something like:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>BootStrap: docker
Registry: http://localhost:5000
Namespace:
......@@ -81,7 +83,22 @@ E.g. to run scripts with pm:</p>
</div>
<p>The jupyter notebook is setup as an app in the container.
To get help on how to run it:</p>
<div class="highlight-bash"><div class="highlight"><pre><span></span>singularity run --app Notebook &lt;IMAGE&gt; --help
<div class="highlight-bash"><div class="highlight"><pre><span></span>singularity <span class="nb">help</span> --app Notebook &lt;IMAGE&gt;
</pre></div>
</div>
<p>Within the notebook you can test OST, ProMod3 and nglview as follows:</p>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">ost</span> <span class="kn">import</span> <span class="n">io</span>
<span class="kn">from</span> <span class="nn">promod3</span> <span class="kn">import</span> <span class="n">loop</span>
<span class="kn">import</span> <span class="nn">nglview</span>
<span class="c1"># generate backbone with dihedrals of a helix and store it</span>
<span class="n">sequence</span> <span class="o">=</span> <span class="s2">&quot;HELLYEAH&quot;</span>
<span class="n">bb_list</span> <span class="o">=</span> <span class="n">loop</span><span class="o">.</span><span class="n">BackboneList</span><span class="p">(</span><span class="n">sequence</span><span class="p">)</span>
<span class="n">io</span><span class="o">.</span><span class="n">SavePDB</span><span class="p">(</span><span class="n">bb_list</span><span class="o">.</span><span class="n">ToEntity</span><span class="p">(),</span> <span class="s2">&quot;test.pdb&quot;</span><span class="p">)</span>
<span class="c1"># display stored file</span>
<span class="n">view</span> <span class="o">=</span> <span class="n">nglview</span><span class="o">.</span><span class="n">show_file</span><span class="p">(</span><span class="s2">&quot;test.pdb&quot;</span><span class="p">)</span>
<span class="n">view</span>
</pre></div>
</div>
</div>
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment