Skip to content

Commit c732f2f

Browse files
committed
docs:remote+docker
Signed-off-by: Kurt Pagani <nilqed@gmail.com>
1 parent c3f0983 commit c732f2f

27 files changed

+540
-15
lines changed
9 Bytes
Binary file not shown.
2.39 KB
Binary file not shown.
3.05 KB
Binary file not shown.
40 Bytes
Binary file not shown.
9 Bytes
Binary file not shown.
15.4 KB
Binary file not shown.
9 Bytes
Binary file not shown.
9 Bytes
Binary file not shown.
27.6 KB
Loading
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
============
2+
Docker image
3+
============
4+
We can easily build a docker image ... todo

docs/sphinx/_build/html/_sources/index.rst.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ Welcome to jFriCAS's documentation!
1414
usage.rst
1515
config.rst
1616
webspad.rst
17+
remote.rst
18+
docker.rst
1719

1820
Indices and tables
1921
==================
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
==============
2+
Remote via SSH
3+
==============
4+
We can use *Jupyter* on any suitable client remotely by ``ssh tunneling``
5+
and ``port forwarding``.
6+
::
7+
8+
cmd='jupyter notebook --no-browser'
9+
ssh -L localhost:localport:remotehost:remoteport remoteuser@remotehost $cmd
10+
11+
For example, we may use the same standard port ``8888`` locally as well:
12+
::
13+
14+
ssh -L localhost:8888:localhost:8888 user@nowhere.com $cmd
15+
16+
17+
Then, after entering your ``ssh`` password,
18+
::
19+
20+
[I 03:07:58.252 NotebookApp] Writing notebook server cookie secret to /run/user/1001/jupyter/notebook_cookie_secret
21+
[I 03:07:58.501 NotebookApp] Serving notebooks from local directory: /home/kfp
22+
[I 03:07:58.502 NotebookApp] 0 active kernels
23+
[I 03:07:58.502 NotebookApp] The Jupyter Notebook is running at:
24+
[I 03:07:58.502 NotebookApp] http://localhost:8888/?token=cbf1e582d5b44eadc20cf1fcb806c07b4074fbf9f38e8f27
25+
[I 03:07:58.502 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
26+
[C 03:07:58.503 NotebookApp]
27+
28+
Copy/paste this URL into your browser when you connect for the first time,
29+
to login with a token:
30+
http://localhost:8888/?token=cbf1e582d5b44eadc20cf1fcb806c07b4074fbf9f38e8f27&token=cbf1e582d5b44eadc20cf1fcb806c07b4074fbf9f38e8f27
31+
32+
33+
the ``jupyter notebook`` will be started on the remote machine and the port will
34+
be forwared to you, that is, open your browser and copy/paste the URL as
35+
suggested above or alternatively enter
36+
::
37+
38+
localhost:8888
39+
40+
and you will see something like
41+
42+
.. image:: pics/jupypw.png
43+
44+
If you enter the token (e.g. from the example above:
45+
cbf1e582d5b44eadc20cf1fcb806c07b4074fbf9f38e8f27), then you will arrive at
46+
the usual Jupyter home page and you may proceed as usual (note that the
47+
notebooks are stored remotely, so you have to use menu/download if you want them
48+
locally).
49+
50+
Setting a Password
51+
------------------
52+
Instead of using tokens you may set a password_ to protect the server:
53+
::
54+
55+
jupyter notebook password
56+
57+
Details may be found in the official documentation: password_
58+
59+
.. _password: https://jupyter-notebook.readthedocs.io/en/stable/public_server.html
60+
61+
Caveats
62+
-------
63+
* X11 forwarding
64+
65+
66+
Windows Users
67+
-------------
68+
Instead of ``ssh`` you can use ``plink`` or ``putty`` from PuTTy_.
69+
::
70+
71+
C:\> plink -L localhost:8888:localhost:8888 usr@host.dom
72+
$ jupyter notebook --no-browser
73+
74+
However,
75+
the ``ssh`` client provided by GitBASH_ for instance, works perfectly as well.
76+
77+
78+
.. _PuTTy: https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html
79+
.. _GitBASH: https://gitforwindows.org/
80+
81+
82+
Script
83+
------
84+
Clearly, you can enter the commands into a bash script:
85+
::
86+
87+
#!/bin/bash
88+
89+
#remote cmd
90+
cmd='jupyter notebook --no-browser'
91+
92+
# ssh template
93+
#ssh -L localhost:localport:remotehost:remoteport remoteuser@remotehost
94+
95+
ssh -L localhost:8888:localhost:8888 usr@host.dom $cmd
96+
97+
# more commands (after termination of jupyter)
98+
99+
100+

docs/sphinx/_build/html/config.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<script type="text/javascript" src="_static/language_data.js"></script>
1515
<link rel="index" title="Index" href="genindex.html" />
1616
<link rel="search" title="Search" href="search.html" />
17+
<link rel="next" title="Remote via SSH" href="remote.html" />
1718
<link rel="prev" title="Basic Usage" href="usage.html" />
1819

1920
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
@@ -234,13 +235,15 @@ <h3>Navigation</h3>
234235
<li class="toctree-l2"><a class="reference internal" href="#extending-the-kernel">Extending the kernel</a></li>
235236
</ul>
236237
</li>
238+
<li class="toctree-l1"><a class="reference internal" href="remote.html">Remote via SSH</a></li>
237239
</ul>
238240

239241
<div class="relations">
240242
<h3>Related Topics</h3>
241243
<ul>
242244
<li><a href="index.html">Documentation overview</a><ul>
243245
<li>Previous: <a href="usage.html" title="previous chapter">Basic Usage</a></li>
246+
<li>Next: <a href="remote.html" title="next chapter">Remote via SSH</a></li>
244247
</ul></li>
245248
</ul>
246249
</div>

docs/sphinx/_build/html/docker.html

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
2+
<!DOCTYPE html>
3+
4+
<html xmlns="http://www.w3.org/1999/xhtml">
5+
<head>
6+
<meta charset="utf-8" />
7+
<title>Docker image &#8212; jFriCAS 0.3 documentation</title>
8+
<link rel="stylesheet" href="_static/alabaster.css" type="text/css" />
9+
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
10+
<script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script>
11+
<script type="text/javascript" src="_static/jquery.js"></script>
12+
<script type="text/javascript" src="_static/underscore.js"></script>
13+
<script type="text/javascript" src="_static/doctools.js"></script>
14+
<script type="text/javascript" src="_static/language_data.js"></script>
15+
<link rel="index" title="Index" href="genindex.html" />
16+
<link rel="search" title="Search" href="search.html" />
17+
<link rel="prev" title="Remote via SSH" href="remote.html" />
18+
19+
<link rel="stylesheet" href="_static/custom.css" type="text/css" />
20+
21+
22+
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
23+
24+
</head><body>
25+
26+
27+
<div class="document">
28+
<div class="documentwrapper">
29+
<div class="bodywrapper">
30+
31+
32+
<div class="body" role="main">
33+
34+
<div class="section" id="docker-image">
35+
<h1>Docker image<a class="headerlink" href="#docker-image" title="Permalink to this headline"></a></h1>
36+
<p>We can easily build a docker image … todo</p>
37+
</div>
38+
39+
40+
</div>
41+
42+
</div>
43+
</div>
44+
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
45+
<div class="sphinxsidebarwrapper">
46+
<h1 class="logo"><a href="index.html">jFriCAS</a></h1>
47+
48+
49+
50+
51+
52+
53+
54+
55+
<h3>Navigation</h3>
56+
<p class="caption"><span class="caption-text">Contents:</span></p>
57+
<ul class="current">
58+
<li class="toctree-l1"><a class="reference internal" href="install.html">Installation</a></li>
59+
<li class="toctree-l1"><a class="reference internal" href="usage.html">Basic Usage</a></li>
60+
<li class="toctree-l1"><a class="reference internal" href="config.html">Kernel Configuration</a></li>
61+
<li class="toctree-l1"><a class="reference internal" href="webspad.html">Explaining webSPAD</a></li>
62+
<li class="toctree-l1"><a class="reference internal" href="remote.html">Remote via SSH</a></li>
63+
<li class="toctree-l1 current"><a class="current reference internal" href="#">Docker image</a></li>
64+
</ul>
65+
66+
<div class="relations">
67+
<h3>Related Topics</h3>
68+
<ul>
69+
<li><a href="index.html">Documentation overview</a><ul>
70+
<li>Previous: <a href="remote.html" title="previous chapter">Remote via SSH</a></li>
71+
</ul></li>
72+
</ul>
73+
</div>
74+
<div id="searchbox" style="display: none" role="search">
75+
<h3 id="searchlabel">Quick search</h3>
76+
<div class="searchformwrapper">
77+
<form class="search" action="search.html" method="get">
78+
<input type="text" name="q" aria-labelledby="searchlabel" />
79+
<input type="submit" value="Go" />
80+
</form>
81+
</div>
82+
</div>
83+
<script type="text/javascript">$('#searchbox').show(0);</script>
84+
85+
86+
87+
88+
89+
90+
91+
92+
</div>
93+
</div>
94+
<div class="clearer"></div>
95+
</div>
96+
<div class="footer">
97+
&copy;2019, Ralf Hemmecke, Kurt Pagani.
98+
99+
|
100+
Powered by <a href="http://sphinx-doc.org/">Sphinx 2.1.2</a>
101+
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
102+
103+
|
104+
<a href="_sources/docker.rst.txt"
105+
rel="nofollow">Page source</a>
106+
</div>
107+
108+
109+
110+
111+
</body>
112+
</html>

docs/sphinx/_build/html/genindex.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ <h3>Navigation</h3>
6161
<li class="toctree-l1"><a class="reference internal" href="usage.html">Basic Usage</a></li>
6262
<li class="toctree-l1"><a class="reference internal" href="config.html">Kernel Configuration</a></li>
6363
<li class="toctree-l1"><a class="reference internal" href="webspad.html">Explaining webSPAD</a></li>
64+
<li class="toctree-l1"><a class="reference internal" href="remote.html">Remote via SSH</a></li>
65+
<li class="toctree-l1"><a class="reference internal" href="docker.html">Docker image</a></li>
6466
</ul>
6567

6668
<div class="relations">

docs/sphinx/_build/html/index.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ <h1>Welcome to jFriCAS’s documentation!<a class="headerlink" href="#welcome-to
8686
<li class="toctree-l2"><a class="reference internal" href="webspad.html#python-example-for-post">Python example for POST</a></li>
8787
</ul>
8888
</li>
89+
<li class="toctree-l1"><a class="reference internal" href="remote.html">Remote via SSH</a><ul>
90+
<li class="toctree-l2"><a class="reference internal" href="remote.html#setting-a-password">Setting a Password</a></li>
91+
<li class="toctree-l2"><a class="reference internal" href="remote.html#caveats">Caveats</a></li>
92+
<li class="toctree-l2"><a class="reference internal" href="remote.html#windows-users">Windows Users</a></li>
93+
<li class="toctree-l2"><a class="reference internal" href="remote.html#script">Script</a></li>
94+
</ul>
95+
</li>
96+
<li class="toctree-l1"><a class="reference internal" href="docker.html">Docker image</a></li>
8997
</ul>
9098
</div>
9199
</div>
@@ -121,6 +129,8 @@ <h3>Navigation</h3>
121129
<li class="toctree-l1"><a class="reference internal" href="usage.html">Basic Usage</a></li>
122130
<li class="toctree-l1"><a class="reference internal" href="config.html">Kernel Configuration</a></li>
123131
<li class="toctree-l1"><a class="reference internal" href="webspad.html">Explaining webSPAD</a></li>
132+
<li class="toctree-l1"><a class="reference internal" href="remote.html">Remote via SSH</a></li>
133+
<li class="toctree-l1"><a class="reference internal" href="docker.html">Docker image</a></li>
124134
</ul>
125135

126136
<div class="relations">

docs/sphinx/_build/html/install.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@ <h3>Navigation</h3>
469469
</li>
470470
<li class="toctree-l1"><a class="reference internal" href="usage.html">Basic Usage</a></li>
471471
<li class="toctree-l1"><a class="reference internal" href="config.html">Kernel Configuration</a></li>
472+
<li class="toctree-l1"><a class="reference internal" href="remote.html">Remote via SSH</a></li>
472473
</ul>
473474

474475
<div class="relations">

docs/sphinx/_build/html/objects.inv

31 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)