OMS-Docker
There are 2 options to run OMS on your local machine:
- follow instructions at pages Python binding or R binding to install the standard OMS package;
- install Docker and run OMS as Docker container.
The docker image of
OMS is made available for download here
oms.tgz
The standard OMS project example ex01 is made available for download here ex01.zip
The TransimsOMS_project is made available for download here TransimsOMS_example.zip
The rbind_mainExample is made available for download here rbind_mainExample.zip
Install Docker
To install Docker, follow the instructions:
Install the OMS image
If your computer DOESN'T HAVE special internet restrictions for security purposes you can directly go to the next step. If the OMS image is not available on your own machine the ```docker run``` command automatically searches for and installs the proper image.
If your computer DOES HAVE special internet restrictions due to security purposes:
- download the OMS image from the Download box;
- open a terminal, change directory into the folder containing the image and type:
docker load -i oms.tgz
- if the command succeeds, you see something like this
Run an OMS project
The docker command to run an OMS project is slightly different between UNIX based OSs and Windows 10 (Windows 7 uses Docker toolbox and Cigwin thus the command is UNIX like). For the sake of demonstration download the ex01 zip file from the download box.
UNIX based
The Docker image builds the OMS project only the very first time the run command is called from within the project. The picture above shows that the second time only the 'Hello World...' is printed.
Windows 10
To run the example ex01 on Windows 10, follow the UNIX procedure but run the following Docker command
docker run --rm -v C:\<full_path>\<project>:/work omslab/oms:beta simulation/ex00_HelloWorld.sim
Run an OMS project with Python 2 components
The only thing to take into account is when some specific python packages are required. The docker command is always the same, but for including external source packages please look at the TransimsOMS project. Here the TransimsRTE python package is saved into resources folder and then imported into the Router.py script.
Run an OMS project with R components
The only thing to take into account is when some specific R packages are required. The docker command is always the same, but for including external source packages please look at the rbind_mainExample project.
The docker images searches for an Rlibs/source folder. This must gather each and every source package requires plus dependencies. The packages must be numbered so that the dependencies are orderly built into the Rlibs/build folder. These packages get built only the first time.
To import the library just use the standard command:
library("<package>")