From e5b6c64ab85f8ade4777ce42b33f4c7b8d17c466 Mon Sep 17 00:00:00 2001 From: Nok Lam Chan Date: Wed, 14 Jun 2023 15:41:34 +0100 Subject: [PATCH 01/14] Update .gitpod.yml --- .gitpod.yml | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index b8fedd3f93..dbf653d08f 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -10,26 +10,17 @@ tasks: echo PIP_USER=no >> ~/.bashrc && export PIP_USER=no init: | make sign-off - pip install -r test_requirements.txt --user - gp sync-done kedro - command: | - pre-commit install --install-hooks - clear - # Generate a test Kedro project at /workspace/project using the local Kedro version. - - name: test-project - init: | - gp sync-await kedro - export PIP_USER=no - cd /workspace - pip install -e /workspace/kedro --no-deps - source ~/.bashrc + pip install kedro --user + # Generate a test Kedro project at /workspace/project using the local Kedro version. yes project | kedro new -s pandas-iris --checkout main - command: | - pip install -e /workspace/kedro --no-deps cd /workspace/project + pip install -e /workspace/kedro --no-deps -r ../kedro/test_requirements.txt --user + pre-commit install --install-hooks + + command: | clear kedro info - + github: prebuilds: # enable for the master/default branch (defaults to true) From f2b0ff8210740685cd49a36d5200299f6b6bc305 Mon Sep 17 00:00:00 2001 From: Nok Lam Chan Date: Wed, 14 Jun 2023 15:55:05 +0100 Subject: [PATCH 02/14] Update .gitpod.yml --- .gitpod.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index dbf653d08f..7e5de2459d 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -11,7 +11,6 @@ tasks: init: | make sign-off pip install kedro --user - # Generate a test Kedro project at /workspace/project using the local Kedro version. yes project | kedro new -s pandas-iris --checkout main cd /workspace/project pip install -e /workspace/kedro --no-deps -r ../kedro/test_requirements.txt --user From 5c0a2847922ecdf40ed99d628a7c91d9b58c1bcc Mon Sep 17 00:00:00 2001 From: Nok Lam Chan Date: Wed, 14 Jun 2023 16:22:37 +0100 Subject: [PATCH 03/14] Update .gitpod.yml --- .gitpod.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index 7e5de2459d..66fca84b09 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,4 +1,4 @@ -image: gitpod/workspace-full:legacy-dazzle-v1 +image: gitpod/workspace-python-3.10:2023-04-20-16-32-37 tasks: # We want packages installed during the pre-build init steps to go to /workspace @@ -6,20 +6,20 @@ tasks: # but pre-commit requires PIP_USER=no. Hence we set PIP_USER=no and use # pip install --user to install to /workspace. - name: kedro - before: | - echo PIP_USER=no >> ~/.bashrc && export PIP_USER=no + # before: | + # echo PIP_USER=no >> ~/.bashrc && export PIP_USER=no init: | make sign-off - pip install kedro --user + pip install -e /workspace/kedro + cd /workspace yes project | kedro new -s pandas-iris --checkout main - cd /workspace/project - pip install -e /workspace/kedro --no-deps -r ../kedro/test_requirements.txt --user + pip install -e /workspace/kedro -r /workspace/kedro/test_requirements.txt pre-commit install --install-hooks command: | clear kedro info - + github: prebuilds: # enable for the master/default branch (defaults to true) From e222c78d7a15f6d5231d86f73f38ec903957026a Mon Sep 17 00:00:00 2001 From: Nok Date: Wed, 14 Jun 2023 15:53:28 +0000 Subject: [PATCH 04/14] update base image Signed-off-by: Nok --- .gitpod.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index 66fca84b09..625585f359 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,4 +1,4 @@ -image: gitpod/workspace-python-3.10:2023-04-20-16-32-37 +image: gitpod/workspace-python-3.8:2023-05-08-21-16-55 # make build-docs only work on 3.8 because of certain datasets tasks: # We want packages installed during the pre-build init steps to go to /workspace @@ -13,7 +13,8 @@ tasks: pip install -e /workspace/kedro cd /workspace yes project | kedro new -s pandas-iris --checkout main - pip install -e /workspace/kedro -r /workspace/kedro/test_requirements.txt + pip install -r /workspace/kedro/test_requirements.txt + cd /workspace/kedro pre-commit install --install-hooks command: | From e583657b006541c4fb6065a64f1e6247baa00fb2 Mon Sep 17 00:00:00 2001 From: Nok Date: Mon, 26 Jun 2023 16:28:09 +0000 Subject: [PATCH 05/14] update gitpod image and apt-get Signed-off-by: Nok --- .gitpod.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index 625585f359..84e3302279 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,4 +1,4 @@ -image: gitpod/workspace-python-3.8:2023-05-08-21-16-55 # make build-docs only work on 3.8 because of certain datasets +image: gitpod/workspace-full # make build-docs only work on 3.8 because of certain datasets tasks: # We want packages installed during the pre-build init steps to go to /workspace @@ -10,10 +10,11 @@ tasks: # echo PIP_USER=no >> ~/.bashrc && export PIP_USER=no init: | make sign-off + sudo apt-get update && sudo apt-get install -y --no-install-recommends libgl1 pip install -e /workspace/kedro cd /workspace yes project | kedro new -s pandas-iris --checkout main - pip install -r /workspace/kedro/test_requirements.txt + pip install -r /workspace/kedro/test_requirements.txt /workspace/project/src/requirements.txt cd /workspace/kedro pre-commit install --install-hooks From 2c30f90afaf367e9e626a5a9a5858fcab3cf7a60 Mon Sep 17 00:00:00 2001 From: Nok Date: Mon, 26 Jun 2023 16:32:59 +0000 Subject: [PATCH 06/14] Fix gitpod Signed-off-by: Nok --- .gitpod.Dockerfile | 17 +++++++++++++++++ .gitpod.yml | 44 ++++++++++++++++++++++---------------------- 2 files changed, 39 insertions(+), 22 deletions(-) create mode 100644 .gitpod.Dockerfile diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile new file mode 100644 index 0000000000..69edc994a5 --- /dev/null +++ b/.gitpod.Dockerfile @@ -0,0 +1,17 @@ +FROM gitpod/workspace-full:2023-05-08-21-16-55 + +# Some datasets work on 3.8 only +RUN pyenv install 3.8.17\ + && pyenv global 3.8.17 + +# VideoDataSet +RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends libgl1 +RUN sudo apt-get install make +RUN pip install -e /workspace/kedro \ + && cd /workspace \ + && yes project | kedro new -s pandas-iris --checkout main \ + && pip install -r /workspace/kedro/test_requirements.txt /workspace/project/src/requirements.txt \ + && cd /workspace/kedro \ + && pre-commit install --install-hooks + +WORKDIR /workspace \ No newline at end of file diff --git a/.gitpod.yml b/.gitpod.yml index 84e3302279..029b4bbd53 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,26 +1,26 @@ -image: gitpod/workspace-full # make build-docs only work on 3.8 because of certain datasets +image: + file: .gitpod.Dockerfile +# tasks: +# # We want packages installed during the pre-build init steps to go to /workspace +# # rather than ~ so that they are persisted. Gitpod sets PIP_USER=yes to ensure this, +# # but pre-commit requires PIP_USER=no. Hence we set PIP_USER=no and use +# # pip install --user to install to /workspace. +# - name: kedro +# # before: | +# # echo PIP_USER=no >> ~/.bashrc && export PIP_USER=no +# init: | +# make sign-off +# sudo apt-get update && sudo apt-get install -y --no-install-recommends libgl1 +# pip install -e /workspace/kedro +# cd /workspace +# yes project | kedro new -s pandas-iris --checkout main +# pip install -r /workspace/kedro/test_requirements.txt /workspace/project/src/requirements.txt +# cd /workspace/kedro +# pre-commit install --install-hooks -tasks: - # We want packages installed during the pre-build init steps to go to /workspace - # rather than ~ so that they are persisted. Gitpod sets PIP_USER=yes to ensure this, - # but pre-commit requires PIP_USER=no. Hence we set PIP_USER=no and use - # pip install --user to install to /workspace. - - name: kedro - # before: | - # echo PIP_USER=no >> ~/.bashrc && export PIP_USER=no - init: | - make sign-off - sudo apt-get update && sudo apt-get install -y --no-install-recommends libgl1 - pip install -e /workspace/kedro - cd /workspace - yes project | kedro new -s pandas-iris --checkout main - pip install -r /workspace/kedro/test_requirements.txt /workspace/project/src/requirements.txt - cd /workspace/kedro - pre-commit install --install-hooks - - command: | - clear - kedro info +# command: | +# clear +# kedro info github: prebuilds: From 50b5ee1788e9344f0adb7bc7823ba042b3143391 Mon Sep 17 00:00:00 2001 From: Nok Date: Mon, 26 Jun 2023 16:55:19 +0000 Subject: [PATCH 07/14] update dockerfile Signed-off-by: Nok --- .gitpod.Dockerfile | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 69edc994a5..6fda5c31bf 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -1,17 +1,17 @@ FROM gitpod/workspace-full:2023-05-08-21-16-55 # Some datasets work on 3.8 only -RUN pyenv install 3.8.17\ - && pyenv global 3.8.17 +RUN pyenv install 3.8.15\ + && pyenv global 3.8.15 # VideoDataSet RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends libgl1 RUN sudo apt-get install make -RUN pip install -e /workspace/kedro \ - && cd /workspace \ - && yes project | kedro new -s pandas-iris --checkout main \ - && pip install -r /workspace/kedro/test_requirements.txt /workspace/project/src/requirements.txt \ - && cd /workspace/kedro \ - && pre-commit install --install-hooks +# RUN pip install -e /workspace/kedro \ +# && cd /workspace \ +# && yes project | kedro new -s pandas-iris --checkout main \ +# && pip install -r /workspace/kedro/test_requirements.txt /workspace/project/src/requirements.txt \ +# && cd /workspace/kedro \ +# && pre-commit install --install-hooks -WORKDIR /workspace \ No newline at end of file +# WORKDIR /workspace \ No newline at end of file From a1bdd580dfc003b7f87f72bdced094070561d802 Mon Sep 17 00:00:00 2001 From: Nok Date: Mon, 26 Jun 2023 17:06:42 +0000 Subject: [PATCH 08/14] update docker --- .gitpod.Dockerfile | 8 -------- .gitpod.yml | 40 ++++++++++++++++++++-------------------- 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 6fda5c31bf..cc552c9f16 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -7,11 +7,3 @@ RUN pyenv install 3.8.15\ # VideoDataSet RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends libgl1 RUN sudo apt-get install make -# RUN pip install -e /workspace/kedro \ -# && cd /workspace \ -# && yes project | kedro new -s pandas-iris --checkout main \ -# && pip install -r /workspace/kedro/test_requirements.txt /workspace/project/src/requirements.txt \ -# && cd /workspace/kedro \ -# && pre-commit install --install-hooks - -# WORKDIR /workspace \ No newline at end of file diff --git a/.gitpod.yml b/.gitpod.yml index 029b4bbd53..57e2a76501 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,26 +1,26 @@ image: file: .gitpod.Dockerfile -# tasks: -# # We want packages installed during the pre-build init steps to go to /workspace -# # rather than ~ so that they are persisted. Gitpod sets PIP_USER=yes to ensure this, -# # but pre-commit requires PIP_USER=no. Hence we set PIP_USER=no and use -# # pip install --user to install to /workspace. -# - name: kedro -# # before: | -# # echo PIP_USER=no >> ~/.bashrc && export PIP_USER=no -# init: | -# make sign-off -# sudo apt-get update && sudo apt-get install -y --no-install-recommends libgl1 -# pip install -e /workspace/kedro -# cd /workspace -# yes project | kedro new -s pandas-iris --checkout main -# pip install -r /workspace/kedro/test_requirements.txt /workspace/project/src/requirements.txt -# cd /workspace/kedro -# pre-commit install --install-hooks +tasks: + # We want packages installed during the pre-build init steps to go to /workspace + # rather than ~ so that they are persisted. Gitpod sets PIP_USER=yes to ensure this, + # but pre-commit requires PIP_USER=no. Hence we set PIP_USER=no and use + # pip install --user to install to /workspace. + - name: kedro + # before: | + # echo PIP_USER=no >> ~/.bashrc && export PIP_USER=no + init: | + make sign-off + sudo apt-get update && sudo apt-get install -y --no-install-recommends libgl1 + pip install -e /workspace/kedro + cd /workspace + yes project | kedro new -s pandas-iris --checkout main + pip install -r /workspace/kedro/test_requirements.txt /workspace/project/src/requirements.txt + cd /workspace/kedro + pre-commit install --install-hooks -# command: | -# clear -# kedro info + command: | + clear + kedro info github: prebuilds: From fd6ea38ba54fe287af045f38b6431dff4b3ae396 Mon Sep 17 00:00:00 2001 From: Nok Date: Mon, 26 Jun 2023 17:20:09 +0000 Subject: [PATCH 09/14] update docker file Signed-off-by: Nok --- .gitpod.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index 57e2a76501..9e813d2984 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -14,7 +14,7 @@ tasks: pip install -e /workspace/kedro cd /workspace yes project | kedro new -s pandas-iris --checkout main - pip install -r /workspace/kedro/test_requirements.txt /workspace/project/src/requirements.txt + pip install -r /workspace/kedro/test_requirements.txt cd /workspace/kedro pre-commit install --install-hooks From 008718d637c0893f22f84317d959cd41e24ab0f4 Mon Sep 17 00:00:00 2001 From: Nok Date: Mon, 26 Jun 2023 17:28:58 +0000 Subject: [PATCH 10/14] update docker Signed-off-by: Nok --- .gitpod.Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index cc552c9f16..7085c26ad6 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -7,3 +7,4 @@ RUN pyenv install 3.8.15\ # VideoDataSet RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends libgl1 RUN sudo apt-get install make +RUN npm install -g @mermaid-js/mermaid-cli From 1d768b4eacb3c424b97961ae01a896231cd09231 Mon Sep 17 00:00:00 2001 From: Nok Date: Tue, 27 Jun 2023 10:43:05 +0000 Subject: [PATCH 11/14] finally build-docs success Signed-off-by: Nok --- .gitpod.Dockerfile | 6 ++++++ docs/source/conf.py | 1 + docs/source/puppeteer-config.json | 3 ++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 7085c26ad6..4cd465ebf8 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -8,3 +8,9 @@ RUN pyenv install 3.8.15\ RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends libgl1 RUN sudo apt-get install make RUN npm install -g @mermaid-js/mermaid-cli +# https://stackoverflow.com/questions/69564238/puppeteer-error-failed-to-launch-the-browser-process +# https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#chrome-doesnt-launch-on-linux +RUN sudo apt-get install libatk-bridge2.0-0 libcups2 ca-certificates fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils + +# Mermaid headless warning - https://github.com/mermaid-js/mermaid-cli/issues/544#issuecomment-1602955907 +# echo '{"headless": "old"}' >> ./my-puppeteer-config.json> diff --git a/docs/source/conf.py b/docs/source/conf.py index 4140dc4381..5624e36ed7 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -551,6 +551,7 @@ def setup(app): # https://github.com/kedro-org/kedro/issues/1772 mermaid_output_format = "png" # https://github.com/mermaidjs/mermaid.cli#linux-sandbox-issue +# https://github.com/mermaid-js/mermaid-cli/issues/544 mermaid_params = ["-p", here / "puppeteer-config.json", "-s", "2"] # https://github.com/kedro-org/kedro/issues/2451 mermaid_version = mermaid_init_js = "" diff --git a/docs/source/puppeteer-config.json b/docs/source/puppeteer-config.json index 3201af7b73..5adc866e94 100644 --- a/docs/source/puppeteer-config.json +++ b/docs/source/puppeteer-config.json @@ -1,3 +1,4 @@ { - "args": ["--no-sandbox"] + "args": ["--no-sandbox"], + "headless": "old" } From f301899c7805e7dc638886a5c581389bc0633d68 Mon Sep 17 00:00:00 2001 From: Nok Date: Tue, 27 Jun 2023 10:50:46 +0000 Subject: [PATCH 12/14] add -y command Signed-off-by: Nok --- .gitpod.Dockerfile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index 4cd465ebf8..e03635f196 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -10,7 +10,4 @@ RUN sudo apt-get install make RUN npm install -g @mermaid-js/mermaid-cli # https://stackoverflow.com/questions/69564238/puppeteer-error-failed-to-launch-the-browser-process # https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md#chrome-doesnt-launch-on-linux -RUN sudo apt-get install libatk-bridge2.0-0 libcups2 ca-certificates fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils - -# Mermaid headless warning - https://github.com/mermaid-js/mermaid-cli/issues/544#issuecomment-1602955907 -# echo '{"headless": "old"}' >> ./my-puppeteer-config.json> +RUN sudo apt-get install -y --no-install-recommends libatk-bridge2.0-0 libcups2 ca-certificates fonts-liberation libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils From 909d08182840efac0482c5bc379c7b06ca2b98be Mon Sep 17 00:00:00 2001 From: Nok Date: Tue, 27 Jun 2023 11:20:21 +0000 Subject: [PATCH 13/14] remove duplicate install Signed-off-by: Nok --- .gitpod.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitpod.yml b/.gitpod.yml index 9e813d2984..3dd0aeb6bf 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -10,7 +10,6 @@ tasks: # echo PIP_USER=no >> ~/.bashrc && export PIP_USER=no init: | make sign-off - sudo apt-get update && sudo apt-get install -y --no-install-recommends libgl1 pip install -e /workspace/kedro cd /workspace yes project | kedro new -s pandas-iris --checkout main From e492910a45625ac69ad3c005e7c05fec2f0379e1 Mon Sep 17 00:00:00 2001 From: Nok Date: Tue, 27 Jun 2023 13:27:33 +0000 Subject: [PATCH 14/14] Remove comments Signed-off-by: Nok --- .gitpod.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.gitpod.yml b/.gitpod.yml index 3dd0aeb6bf..c2ec591de9 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,13 +1,8 @@ image: file: .gitpod.Dockerfile tasks: - # We want packages installed during the pre-build init steps to go to /workspace - # rather than ~ so that they are persisted. Gitpod sets PIP_USER=yes to ensure this, - # but pre-commit requires PIP_USER=no. Hence we set PIP_USER=no and use - # pip install --user to install to /workspace. - name: kedro - # before: | - # echo PIP_USER=no >> ~/.bashrc && export PIP_USER=no + init: | make sign-off pip install -e /workspace/kedro