Reminder
Docker provides the ability to package and run an application in a loosely isolated environment called a container. The isolation and security lets you run many containers simultaneously on a given host. Containers are lightweight and contain everything needed to run the application, so you don’t need to rely on what’s installed on the host. You can share containers while you work, and be sure that everyone you share with gets the same container that works in the same way.
https://docs.docker.com/get-started/overview/
Prerequesities
docker installation: see https://docs.docker.com/desktop/ for Windows (DockerDesktop), Linux and Mac.
Run Lagun via a docker image
Lagun docker image is available at https://hub.docker.com/r/detocs/lagun
- Start docker if necessary (e.g. run DockerDesktop on Windows)
- Run Lagun image (on Windows, open a CMD or a PowerShell window to execute the following command):
docker run -dp 0.0.0.0:6023:6023 detocs/lagun:1.1.0-I-b3-alpine
- Open a navigator (e.g. Edge, Firefox) and type
localhost:6023
Lagun can be used either in a static or dynamic mode:
- static mode: the user provides a file with the values of outputs of interest for several combinations of the input variables;
- dynamic mode: the user sets up its own simulator (some examples are provided, see hereafter) and the simulations are launched automatically from Lagun, thanks to the
Simulation Launcher
facility.
Run Simulator Launcher via a docker image
Simulation_launcher docker image is available at https://hub.docker.com/r/detocs/lagun-simulations-launcher
NB: The docker image of the simulation launcher is useful only for simulators that run on Linux OS.
(on Windows: open a PowerShell window to execute the following commands)
-
Download examples of simulator files either
- if
git
is available on your machine, by executing the commandgit clone https://ifpen-gitlab.appcollaboratif.fr/detocs/lagun_resources.git
- or by downloading the zip file of the repository files (via the
Code
button on Lagun gitlab web site).
- if
-
Possibly unzip the downloaded file
-
In the root folder (containing
simulator-examples
folder), run Simulation launcher image by this command :- on Windows :
docker run -dp 0.0.0.0:3000:3000 ` --mount type=bind,src="$(pwd)/runningDir",target=/runningDir ` --mount type=bind,src="$(pwd)/simulator-examples",target=/simulator-examples ` detocs/lagun-simulations-launcher:1.1.0-I-b3-alpine
- on Linux :
docker run -dp 0.0.0.0:3000:3000 \ --mount type=bind,src="$(pwd)/runningDir",target=/runningDir \ --mount type=bind,src="$(pwd)/simulator-examples",target=/simulator-examples \ detocs/lagun-simulations-launcher:1.1.0-I-b3-alpine
- on Windows :
-
Open a navigator (e.g. Edge, Firefox) and type
localhost:3000
-
Load simulator examples:
- click on Simulator configurations
- click on import button and choose the configuration file to import:
$(pwd)/simulator-examples/RSimulator/launcherServer-linux.json
You can now access the configured simulators from Lagun (cf navigation bar Problem Definition and then Import DOE).
Enjoy Lagun !
See Tutorials per group of functionnalities and test cases:
- locally in
documentation
folder - or at https://gitlab.ifpen.fr/Optimisation/lagun/-/tree/master-IFPEN/documentation?ref_type=heads
- or via Lagun’s starting page.