Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docker support #129

Merged
merged 37 commits into from
Nov 17, 2020
Merged

Add Docker support #129

merged 37 commits into from
Nov 17, 2020

Conversation

sjoelund
Copy link
Member

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

@adeas31
Copy link
Member

adeas31 commented Nov 16, 2020

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')

Copy link
Member

@adeas31 adeas31 left a comment

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
Copy link
Member

adeas31 commented Nov 17, 2020

Maybe add an example with port use.

@sjoelund
Copy link
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
Member Author

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

@adeas31
Copy link
Member

adeas31 commented Nov 17, 2020

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
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants