Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
doc: explain how to install stuff in a docker that runs as a user
[simgrid.git] / docs / source / Tutorial_Algorithms.rst
index 9ec4834..0166e8e 100644 (file)
@@ -390,6 +390,19 @@ All needed dependencies are already installed in this container
 optional in this tutorial, it is not installed to reduce the image
 size.
 
+The docker does not run as root, so that the files can easily be exchanged between within the container and the outer world.
+If you need to run a command as root within the container, simply type the following in another terminal to join the same container as root:
+
+.. code-block:: console
+
+   $ docker container ls
+   # This lists all containers running on your machine. For example:
+   #    CONTAINER ID   IMAGE            COMMAND   CREATED         STATUS         PORTS     NAMES
+   #    7e921b1b18a7   simgrid/stable   "bash"    7 minutes ago   Up 7 minutes             adoring_shamir
+   
+   $ docker exec --user 0:0 -it {container_name} bash
+   # In the previous example, container_name was "adoring_shamir"
+
 The code template is available under ``/source/simgrid-template-s4u.git``
 in the image. You should copy it to your working directory and
 recompile it when you first log in:
@@ -563,7 +576,7 @@ It produces a ``Rplots.pdf`` with the following content:
 Lab 1: Simpler deployments
 --------------------------
 
-.. rst-class:: learning-goals
+.. rst-class:: compact-list
 
    **Learning goals:** 
 
@@ -647,7 +660,7 @@ for more details.
 Lab 2: Using the Whole Platform
 -------------------------------
 
-.. rst-class:: learning-goals
+.. rst-class:: compact-list
 
    **Learning goals:** 
 
@@ -765,7 +778,7 @@ separation of concerns between things of different nature.
 Lab 3: Fixed Experiment Duration
 --------------------------------
 
-.. rst-class:: learning-goals
+.. rst-class:: compact-list
 
    **Learning goals:** 
 
@@ -812,22 +825,18 @@ default. You can still see the debug messages as follows:
 Lab 4: What-if analysis
 -----------------------
 
-.. rst-class:: learning-goals
+.. rst-class:: compact-list
 
    **Learning goals:** 
 
    * Change the platform characteristics during the simulation.
    * Explore other communication patterns.
 
-.. todo::
-
-   Some of the required functions are not implemented in Python yet. You can detect that if the method name is not a link to the documentation.
-
 Computational speed
 ...................
 
 Attach a profile to your hosts, so that their computational speed automatically vary over time, modeling an external load on these machines.
-This can be done with :cpp:func:`simgrid::s4u::Host::set_speed_profile` (C++) or :py:func:`simgrid.Host.set_speed_profile` (python). 
+This can be done with :cpp:func:`simgrid::s4u::Host::set_speed_profile` (C++) or :py:func:`simgrid.Host.set_speed_profile` (Python). 
 
 Make it so that one of the hosts get really really slow, and observe how your whole application performance decreases.
 This is because one slow host slows down the whole process. Instead of a round-robin dispatch push, 
@@ -854,7 +863,7 @@ Retrieve all links in the platform with :cpp:func:`simgrid::s4u::Engine::get_all
 Retrieve the list of links from one host to another with :cpp:func:`simgrid::s4u::Host::route_to` (C++) or :py:func:`simgrid.Host.route_to` (python).
 
 Modify the bandwidth of a given link with :cpp:func:`simgrid::s4u::Link::set_bandwidth` (C++) or :py:func:`simgrid.Link.set_bandwidth` (python).
-You can even have the bandwidth automatically vary over time with :cpp:func:`simgrid::s4u::Link::set_bandwidth_profile` (C++) or :py:func:`simgrid.Link.set_bandwidth_profile` (python). 
+You can even have the bandwidth automatically vary over time with :cpp:func:`simgrid::s4u::Link::set_bandwidth_profile` (C++) or :py:func:`simgrid.Link.set_bandwidth_profile` (python).
 
 Once implemented, you will notice that slow communications may still result in situations
 where one worker only works at a given point of time. To overcome that, your master needs 
@@ -878,7 +887,7 @@ Again, there is a nice example demoing this feature, :ref:`under platform-failur
 Lab 5: Competing Applications
 -----------------------------
 
-.. rst-class:: learning-goals
+.. rst-class:: compact-list
 
    **Learning goals:** 
 
@@ -928,7 +937,7 @@ and wait for its completion, as follows.
 
          exec = simgrid:.this_actor.exec_init(compute_cost)
          exec.set_tracing_category(category)
-         // exec.start() is optional here as wait() starts the activity on need
+         # exec.start() is optional here as wait() starts the activity on need
          exec->wait()
 
       You can shorten this code as follows: