-
Notifications
You must be signed in to change notification settings - Fork 109
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
Headless operation for docker #408
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about not to use docker-watchdog script but create another like headless-watchdog?
for _ in range(10): | ||
inference_model.infer(dummy_call, DummyUploadProxy, {}) | ||
if compile: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we really need 10 times inference of test batch?
continue | ||
text = open(fn).read() | ||
|
||
model_assigner.models_to_watchdog_configs() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is needed if we remove something from models list (deprecated or something)
def first_run(): | ||
if HEADLESS: | ||
return | ||
subprocess.check_call(FIRST_RUN_CMDLINE) | ||
|
||
|
||
def main_loop(): | ||
# Generate a random SMALLCLOUD_API_KEY, it will be inherited by subprocesses, | ||
# this allows inference_worker to authorize on the local web server (both use | ||
# this variable), and work safely even if we expose http port to the world. | ||
os.environ["SMALLCLOUD_API_KEY"] = str(uuid.uuid4()) | ||
if not HEADLESS: | ||
# Generate a random SMALLCLOUD_API_KEY, it will be inherited by subprocesses, | ||
# this allows inference_worker to authorize on the local web server (both use | ||
# this variable), and work safely even if we expose http port to the world. | ||
os.environ["SMALLCLOUD_API_KEY"] = str(uuid.uuid4()) | ||
else: | ||
assert "SMALLCLOUD_API_KEY" in os.environ | ||
|
||
first_run() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it will be better to move first_run call under not HEADLESS branch
@@ -15,6 +15,7 @@ | |||
|
|||
from refact_utils.scripts import env | |||
|
|||
HEADLESS = ("--headless" in sys.argv) # for ui-less docker: skip all standard cfg-s (web ui, enum gpus, etc), skip first_run script |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ugly hack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like you didn't resolve my previous claims
No description provided.