Skip to content

Commit

Permalink
Merge pull request #262 from datmo/add-info-init
Browse files Browse the repository at this point in the history
adding info during init and port mapping for datmo terminal
  • Loading branch information
asampat3090 committed Sep 5, 2018
2 parents 783dbb9 + d705e85 commit 89fbb30
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions datmo/cli/command/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ def init(self, name, description):
self.cli_helper.echo(
__("info", "cli.environment.setup.success",
(environment_obj.name, environment_obj.id)))
else:
self.cli_helper.echo("there was no environment setup. you can get information"
" here: https://datmo.readthedocs.io/en/latest/env-setup.html")

return self.project_controller.model

Expand Down
1 change: 1 addition & 0 deletions datmo/cli/command/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def terminal(self, **kwargs):

task_dict = {
"interactive": True,
"ports": kwargs['ports'],
"mem_limit": kwargs["mem_limit"],
"command_list": ["/bin/bash"]
}
Expand Down
11 changes: 11 additions & 0 deletions datmo/cli/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,17 @@ def get_datmo_parser():
"list of absolute or relative filepath and/or dirpaths for data; can specify destination names"
" with '>' (e.g. /path/to/dir, /path/to/dir>newdir, /path/to/file)"
)
terminal_parser.add_argument(
"--ports",
"-p",
dest="ports",
default=None,
action="append",
type=str,
help="""
network port mapping during run (e.g. 8888:8888). Left is the host machine port and right
is the environment port available during a run.
""")

# Rstudio
rstudio_parser = subparsers.add_parser(
Expand Down

0 comments on commit 89fbb30

Please sign in to comment.