Skip to content

Add Docker support - #129

Merged
sjoelund merged 37 commits into
OpenModelica:masterfrom
sjoelund:docker-support
Nov 17, 2020
Merged

Add Docker support#129
sjoelund merged 37 commits into
OpenModelica:masterfrom
sjoelund:docker-support

Conversation

@sjoelund

Copy link
Copy Markdown
Member

For example, use OMCSessionZMQ(docker="openmodelica/openmodelica:v1.16.0-minimal")

@sjoelund
sjoelund requested a review from adeas31 November 16, 2020 16:20
@adeas31

adeas31 commented Nov 16, 2020

Copy link
Copy Markdown
Member

Gives this error on Windows,

def _create_omc_log_file(self, suffix):
        if sys.platform == 'win32':
            self._omc_log_file = open(os.path.join(self._temp_dir, "openmodelica.{0}.{1}.log".format(suffix, self._random_string)), 'w')
        else:
            try:
              self._currentUser = getpass.getuser()
              if not self._currentUser:
                  self._currentUser = "nobody"
            except KeyError:
              # We are running as a uid not existing in the password database... Pretend we are nobody
              self._currentUser = "nobody"
            # this file must be closed in the destructor
            self._omc_log_file = open(os.path.join(self._temp_dir, "openmodelica.{0}.{1}.{2}.log".format(self._currentUser, suffix, self._random_string)), 'w')

@adeas31 adeas31 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add psutil to setup.py

@adeas31

adeas31 commented Nov 17, 2020

Copy link
Copy Markdown
Member

Maybe add an example with port use.

@sjoelund

Copy link
Copy Markdown
Member Author

I thought to add that to the OM documentation. There are no example commands in this repository, right? I looked for it and didn't find any...

@sjoelund

Copy link
Copy Markdown
Member Author

Or do you mean testcases? I'm a little hesitant since it might randomly fail...

@adeas31

adeas31 commented Nov 17, 2020

Copy link
Copy Markdown
Member

I mean to add a testcase for it.

As that is the only way in Windows so it has to be clearly mentioned in users guide. I also suggest to write it in the README.

@sjoelund

Copy link
Copy Markdown
Member Author

The README only has help(OMPython) :D

@sjoelund
sjoelund merged commit 0abd16e into OpenModelica:master Nov 17, 2020
@sjoelund
sjoelund deleted the docker-support branch November 17, 2020 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants