Skip to content

Commit af8d305

Browse files
committed
wip
1 parent 1699110 commit af8d305

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

custom_model_runner/datarobot_drum/drum/gunicorn/gunicorn.conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
if temp_loglevel in {"debug", "info", "warning", "error", "critical"}:
6767
loglevel = temp_loglevel
6868

69-
bind = os.environ.get("ADDRESS", "0.0.0.0:8080")
69+
bind = os.environ["ADDRESS"]
7070
# loglevel = "info"
7171
accesslog = "-"
7272
access_log_format = '%(h)s %(l)s %(u)s %(t)s "%(r)s" %(s)s %(b)s "%(f)s" "%(a)s"'

custom_model_runner/datarobot_drum/drum/utils/setup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
Released under the terms of DataRobot Tool and Utility Agreement.
66
"""
77

8+
import os
89
import sys
910

1011
from datarobot_drum import RuntimeParameters
@@ -48,6 +49,10 @@ def setup_options(args=None):
4849

4950
options = arg_parser.parse_args(args)
5051

52+
# Set ADDRESS env var from parsed options if not already set
53+
if getattr(options, 'address', None) and 'ADDRESS' not in os.environ:
54+
os.environ['ADDRESS'] = options.address
55+
5156
"""Set max workers from runtime parameters if available."""
5257
if RuntimeParameters.has("CUSTOM_MODEL_WORKERS"):
5358
options.max_workers = RuntimeParameters.get("CUSTOM_MODEL_WORKERS")

0 commit comments

Comments
 (0)