From a2ee7a11d1e44e26b45488c47456b3c0b725f1b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nok=20Lam=20Chan=20=E9=99=B3=E8=AB=BE=E6=9E=97?= Date: Wed, 28 Jun 2023 11:00:52 +0100 Subject: [PATCH] Make GitPod works (#2688) * update base image Signed-off-by: Nok * update gitpod image and apt-get Signed-off-by: Nok * update docker Signed-off-by: Nok --------- Signed-off-by: Nok Signed-off-by: debugger24 --- .gitpod.Dockerfile | 13 +++++++++++++ .gitpod.yml | 30 ++++++++---------------------- 2 files changed, 21 insertions(+), 22 deletions(-) create mode 100644 .gitpod.Dockerfile diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile new file mode 100644 index 0000000000..e03635f196 --- /dev/null +++ b/.gitpod.Dockerfile @@ -0,0 +1,13 @@ +FROM gitpod/workspace-full:2023-05-08-21-16-55 + +# Some datasets work on 3.8 only +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 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 -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 diff --git a/.gitpod.yml b/.gitpod.yml index b8fedd3f93..c2ec591de9 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -1,32 +1,18 @@ -image: gitpod/workspace-full:legacy-dazzle-v1 - +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 -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 + pip install -e /workspace/kedro cd /workspace - pip install -e /workspace/kedro --no-deps - source ~/.bashrc yes project | kedro new -s pandas-iris --checkout main + pip install -r /workspace/kedro/test_requirements.txt + cd /workspace/kedro + pre-commit install --install-hooks + command: | - pip install -e /workspace/kedro --no-deps - cd /workspace/project clear kedro info