new env:NO_GUI

This commit is contained in:
hy.li 2023-08-03 19:31:21 +08:00
parent 7b9c85b1a2
commit 1c3a714ad3
2 changed files with 2 additions and 1 deletions

View file

@ -8,6 +8,7 @@ RUN apt update &&\
# Install Mermaid CLI globally
ENV CHROME_BIN="/usr/bin/chromium" \
NO_GUI="true"\
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
RUN npm install -g @mermaid-js/mermaid-cli &&\
npm cache clean --force

View file

@ -13,7 +13,7 @@ from metagpt.const import PROJECT_ROOT
from metagpt.logs import logger
from metagpt.utils.common import check_cmd_exists
IS_DOCKER = os.environ.get('PUPPETEER_SKIP_CHROMIUM_DOWNLOAD', 'false').lower()
IS_DOCKER = os.environ.get('NO_GUI', 'false').lower()
def mermaid_to_file(mermaid_code, output_file_without_suffix, width=2048, height=2048) -> int: