Use envvars for configuration instead of a file#1091
Use envvars for configuration instead of a file#1091lukeyeager merged 3 commits intoNVIDIA:masterfrom
Conversation
|
This seems to improve the time it takes to start tools (and this should be reflected on Travis test time too): before: $ time ./tools/inference.py --help
real 0m0.821sAfter: $ time ./tools/inference.py --help
real 0m0.438s |
gheinrich
left a comment
There was a problem hiding this comment.
Can we document the full list of environment variables?
| @classmethod | ||
| def get_extensions(cls, show_all): | ||
| return extensions.view.get_extensions(show_all=show_all) | ||
| if 'DIGITS_ALL_EXTENSIONS' in os.environ: |
| # make the directory | ||
| os.mkdir(self._config_file_value) | ||
|
|
||
| if 'DIGITS_MODE_TEST' in os.environ: |
There was a problem hiding this comment.
maybe move this to a function like you are doing for other options like log_file?
There was a problem hiding this comment.
Do you really think that's more legible? I thought I'd just keep it simple when I can.
There was a problem hiding this comment.
No I think it's fine this way, forget that comment.
| if config_value('caffe_root')['flavor'] == 'NVIDIA': | ||
| if config_value('caffe_root')['version'] > parse_version('0.14.0-alpha'): | ||
| if config_value('caffe')['flavor'] == 'NVIDIA': | ||
| if parse_version(config_value('caffe')['version']) > parse_version('0.14.0-alpha'): |
|
|
||
|
|
||
| if 'CAFFE_ROOT' in os.environ: | ||
| executable, version, flavor = load_from_envvar('CAFFE_ROOT') |
| raise ValueError('Torch executable not found at "%s" (TORCH_HOME)' | ||
| % os.environ['TORCH_HOME']) | ||
| else: | ||
| executable = find_executable() |
I added a doc at |
gheinrich
left a comment
There was a problem hiding this comment.
Maybe edit the doc in https://github.com/NVIDIA/DIGITS/blob/v4.0.0/docs/BuildDigits.md#building-digits too?
|
Oops, I meant to squash before merging. Sorry. |
Use envvars for configuration instead of a file
Close #941, close #180, fix #1090
Bug 1804528
Also,