Running Spawn inside a Docker container #3969
-
|
When I run Spawn locally from {
"version": "0.1",
"EnergyPlus": {
"idf": "/home/reituag/gitrepo/modelica-buildings/Buildings/Resources/Data/ThermalZones/EnergyPlus_9_6_0/Examples/SingleFamilyHouse_TwoSpeed_ZoneAirBalance/SingleFamilyHouse_TwoSpeed_ZoneAirBalance.idf",
"weather": "/home/reituag/gitrepo/modelica-buildings/Buildings/Resources/weatherdata/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw",However, when I run Spawn from {
"version": "0.1",
"EnergyPlus": {
"idf": "/tmp/JModelica.org/jm_tmpzh05d4xs/resources/0/SingleFamilyHouse_TwoSpeed_ZoneAirBalance.idf",
"weather": "/tmp/JModelica.org/jm_tmpzh05d4xs/resources/1/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw",and the following error: So perhaps the question is how the JSON properties Thanks for any insight. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
The error message looks strange to me. It contains and in the same message. This looks like your docker has spawn installed in The C code that invokes spawn searches for the spawn binary in various places, see Eventually, as the path to the Modelica Buildings Library is exported to the docker, and spawn knows the top-level directory name, it will find the binary of the Modelica Buildings Library. However, in your error message, it looks like spawn first finds it in |
Beta Was this translation helpful? Give feedback.
-
Yes, I bind mount the directory with the Spawn executable, that I manually installed outside the MBL directory on the host. > which spawn
/mnt/home/reituag/spawn/Spawn-light-0.5.0-c10e8c6d7e-Linux/bin/spawnBut I found the solution. > tree ~/spawn/Spawn-light-0.5.0-c10e8c6d7e-Linux/
/home/reituag/spawn/Spawn-light-0.5.0-c10e8c6d7e-Linux/
├── bin
│ ├── spawn -> spawn-0.5.0-c10e8c6d7e
│ └── spawn-0.5.0-c10e8c6d7e
├── etc
│ └── Energy+.idd
├── lib
│ └── epfmi.so
└── README.mdSo, replacing: docker run -v /home/reituag/spawn/Spawn-light-0.5.0-c10e8c6d7e-Linux/bin:/mnt/home/reituag/spawn/Spawn-light-0.5.0-c10e8c6d7e-Linux/bin:ro ...with docker run -v /home/reituag/spawn/Spawn-light-0.5.0-c10e8c6d7e-Linux:/mnt/home/reituag/spawn/Spawn-light-0.5.0-c10e8c6d7e-Linux:rosolved the issue for me. Note that the error message that I shared in my previous post was taken from the OCT log file. |
Beta Was this translation helpful? Give feedback.
Yes, I bind mount the directory with the Spawn executable, that I manually installed outside the MBL directory on the host.
This is because I am using the development branch of MBL and not the public release which comes with a bundled Spawn executable.
The
PATHenvironment variable of the container is set to include the path where the Spawn directory is mounted in the container.So, from within the container:
> which s…