From 6d203678014d3b6e61386d17dde81973cd79b0ac Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Fri, 25 Apr 2025 10:56:40 +0000 Subject: [PATCH 1/7] add docker config --- .devcontainer/Dockerfile | 18 ++++++++++++++++++ .devcontainer/devcontainer.json | 19 +++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 00000000000..9803a7c9523 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,18 @@ +FROM mcr.microsoft.com/devcontainers/javascript-node:20 + +# Install Python 3.12 and pip +RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ + && apt-get -y install --no-install-recommends software-properties-common \ + && add-apt-repository ppa:deadsnakes/ppa \ + && apt-get update \ + && apt-get -y install --no-install-recommends python3.12 python3.12-venv python3.12-dev python3-pip \ + && python3.12 -m pip install --upgrade pip \ + && ln -sf /usr/bin/python3.12 /usr/local/bin/python \ + && ln -sf /usr/bin/python3.12 /usr/local/bin/python3 \ + && ln -sf /usr/bin/pip3 /usr/local/bin/pip + +# Install pnpm globally +RUN npm install -g pnpm + +# Install autorest globally +RUN npm install -g autorest diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 00000000000..5a98a4f2f70 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,19 @@ +{ + "name": "Standard", + "build": { + "dockerfile": "Dockerfile" + }, + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "streetsidesoftware.code-spell-checker", + "vitest.explorer" + ] + } + } + } + \ No newline at end of file From 90c3a99eb44df4ad23451a707ed6321e8f08c2bc Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Fri, 25 Apr 2025 11:16:40 +0000 Subject: [PATCH 2/7] update --- .devcontainer/Dockerfile | 38 ++++++++++++++++++++------------- .devcontainer/devcontainer.json | 32 +++++++++++++-------------- 2 files changed, 39 insertions(+), 31 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 9803a7c9523..6cb04ff9af5 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,18 +1,26 @@ FROM mcr.microsoft.com/devcontainers/javascript-node:20 -# Install Python 3.12 and pip -RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \ - && apt-get -y install --no-install-recommends software-properties-common \ - && add-apt-repository ppa:deadsnakes/ppa \ - && apt-get update \ - && apt-get -y install --no-install-recommends python3.12 python3.12-venv python3.12-dev python3-pip \ - && python3.12 -m pip install --upgrade pip \ - && ln -sf /usr/bin/python3.12 /usr/local/bin/python \ - && ln -sf /usr/bin/python3.12 /usr/local/bin/python3 \ - && ln -sf /usr/bin/pip3 /usr/local/bin/pip - -# Install pnpm globally -RUN npm install -g pnpm +RUN corepack enable pnpm \ + && echo 'alias pnpm="corepack pnpm"' >> /home/node/.bash_aliases -# Install autorest globally -RUN npm install -g autorest +# Install Python 3.12 and pip +RUN set -ex && \ + apt-get update && \ + export DEBIAN_FRONTEND=noninteractive && \ + apt-get -y install --no-install-recommends wget build-essential libreadline-dev \ + libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev \ + libbz2-dev libffi-dev zlib1g-dev && \ + cd /tmp && \ + wget https://www.python.org/ftp/python/3.12.2/Python-3.12.2.tgz && \ + tar -xf Python-3.12.2.tgz && \ + cd Python-3.12.2 && \ + ./configure --enable-optimizations && \ + make -j$(nproc) && \ + make altinstall && \ + ln -sf /usr/local/bin/python3.12 /usr/local/bin/python && \ + ln -sf /usr/local/bin/python3.12 /usr/local/bin/python3 && \ + ln -sf /usr/local/bin/pip3.12 /usr/local/bin/pip && \ + cd / && \ + rm -rf /tmp/Python-3.12.2 /tmp/Python-3.12.2.tgz && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* \ No newline at end of file diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 5a98a4f2f70..cf9a2e4e8fd 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,19 +1,19 @@ { - "name": "Standard", - "build": { - "dockerfile": "Dockerfile" - }, - "customizations": { - // Configure properties specific to VS Code. - "vscode": { - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "dbaeumer.vscode-eslint", - "esbenp.prettier-vscode", - "streetsidesoftware.code-spell-checker", - "vitest.explorer" - ] - } + "name": "Standard", + "build": { + "dockerfile": "Dockerfile" + }, + "postCreateCommand": "npm install -g autorest", + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "dbaeumer.vscode-eslint", + "esbenp.prettier-vscode", + "streetsidesoftware.code-spell-checker", + "vitest.explorer" + ] } } - \ No newline at end of file +} \ No newline at end of file From 927c8631c387328f03c94413b4b53d913b9770f9 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Fri, 25 Apr 2025 20:27:42 +0800 Subject: [PATCH 3/7] Delete .devcontainer/Dockerfile --- .devcontainer/Dockerfile | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 6cb04ff9af5..00000000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM mcr.microsoft.com/devcontainers/javascript-node:20 - -RUN corepack enable pnpm \ - && echo 'alias pnpm="corepack pnpm"' >> /home/node/.bash_aliases - -# Install Python 3.12 and pip -RUN set -ex && \ - apt-get update && \ - export DEBIAN_FRONTEND=noninteractive && \ - apt-get -y install --no-install-recommends wget build-essential libreadline-dev \ - libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev \ - libbz2-dev libffi-dev zlib1g-dev && \ - cd /tmp && \ - wget https://www.python.org/ftp/python/3.12.2/Python-3.12.2.tgz && \ - tar -xf Python-3.12.2.tgz && \ - cd Python-3.12.2 && \ - ./configure --enable-optimizations && \ - make -j$(nproc) && \ - make altinstall && \ - ln -sf /usr/local/bin/python3.12 /usr/local/bin/python && \ - ln -sf /usr/local/bin/python3.12 /usr/local/bin/python3 && \ - ln -sf /usr/local/bin/pip3.12 /usr/local/bin/pip && \ - cd / && \ - rm -rf /tmp/Python-3.12.2 /tmp/Python-3.12.2.tgz && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* \ No newline at end of file From aaf9dd1616f4046bd8c3e0dbf5b226cdc4beacd0 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Fri, 25 Apr 2025 20:36:20 +0800 Subject: [PATCH 4/7] Update devcontainer.json --- .devcontainer/devcontainer.json | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index cf9a2e4e8fd..35da0d03885 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,19 +1,4 @@ { "name": "Standard", - "build": { - "dockerfile": "Dockerfile" - }, - "postCreateCommand": "npm install -g autorest", - "customizations": { - // Configure properties specific to VS Code. - "vscode": { - // Add the IDs of extensions you want installed when the container is created. - "extensions": [ - "dbaeumer.vscode-eslint", - "esbenp.prettier-vscode", - "streetsidesoftware.code-spell-checker", - "vitest.explorer" - ] - } - } -} \ No newline at end of file + "postCreateCommand": "npm install -g autorest" +} From 485b9df9ae46c64586482d9fc6aee4e60d2c7423 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Fri, 25 Apr 2025 12:57:31 +0000 Subject: [PATCH 5/7] update --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 35da0d03885..31207cd5e4c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,4 +1,4 @@ { "name": "Standard", - "postCreateCommand": "npm install -g autorest" + "postCreateCommand": "nvm install 22 && npm install -g autorest pnpm" } From d1532945b27244371caa45fce81b7c7071934cfc Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Fri, 25 Apr 2025 13:05:40 +0000 Subject: [PATCH 6/7] update --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 31207cd5e4c..6fe3c4add53 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,4 +1,4 @@ { "name": "Standard", - "postCreateCommand": "nvm install 22 && npm install -g autorest pnpm" + "onCreateCommand": "nvm install 22 && npm install -g autorest pnpm" } From c122924d3de51e3e34d17e6bcdee4b91b4b34ec4 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Fri, 25 Apr 2025 13:10:24 +0000 Subject: [PATCH 7/7] update --- .devcontainer/devcontainer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 6fe3c4add53..31207cd5e4c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,4 +1,4 @@ { "name": "Standard", - "onCreateCommand": "nvm install 22 && npm install -g autorest pnpm" + "postCreateCommand": "nvm install 22 && npm install -g autorest pnpm" }