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

Headless operation for docker #408

Open
wants to merge 9 commits into
base: dev
Choose a base branch
from
Open

Headless operation for docker #408

wants to merge 9 commits into from

Conversation

olegklimov
Copy link
Contributor

No description provided.

Copy link
Member

@mitya52 mitya52 left a 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?

Comment on lines 76 to 78
for _ in range(10):
inference_model.infer(dummy_call, DummyUploadProxy, {})
if compile:
Copy link
Member

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

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)

Comment on lines 440 to 455
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()
Copy link
Member

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

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ugly hack

Copy link
Member

@mitya52 mitya52 left a 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

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.

None yet

2 participants