Skip to content

Commit

Permalink
Add --single-process chromium arg on AWS Lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
jonmmease committed Feb 27, 2021
1 parent eb7dfb8 commit fa3cd67
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions repos/kaleido/py/kaleido/scopes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@ class BaseScope(object):
# flags to configure scope
_scope_flags = ()

# Specify default chromium arguments
_default_chromium_args = (
"--disable-gpu",
"--allow-file-access-from-files",
"--disable-breakpad",
"--disable-dev-shm-usage",
) + (
# Add "--single-process" when running on AWS Lambda. Flag is described
# as for debugging only by the chromium project, but it's the only way to get
# chromium headless working on Lambda
("--single-process",) if os.environ.get("LAMBDA_RUNTIME_DIR", None) else ()
)

_scope_chromium_args = ()
Expand Down

0 comments on commit fa3cd67

Please sign in to comment.