From 8684a5425af6dcf6e34aadf3fb352f442dc2c60c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Thu, 27 Mar 2025 05:25:39 +0100 Subject: [PATCH 1/6] Initial commit --- .devcontainer/devcontainer.json | 17 +++++++++++++++++ .devcontainer/setup.sh | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .devcontainer/devcontainer.json create mode 100755 .devcontainer/setup.sh diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000000000..a31be79313703 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,17 @@ +{ + // More info about Features: https://containers.dev/features + "image": "mcr.microsoft.com/devcontainers/universal:2", + "features": {}, + + "onCreateCommand": ".devcontainer/setup.sh", + "postCreateCommand": "", + + "customizations": { + "vscode": { + "extensions": [ + "ms-python.python" + ], + "settings": {} + } + } +} diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh new file mode 100755 index 0000000000000..95ae8a721de68 --- /dev/null +++ b/.devcontainer/setup.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +set -e + +"${SHELL}" <(curl -Ls micro.mamba.pm/install.sh) < /dev/null + +conda init --all +micromamba shell init -s bash +micromamba env create -f build_tools/circle/doc_environment.yml --yes +# Note that `micromamba activate sklearn-dev` doesn't work, it must be run by the +# user (same applies to `conda activate`) + +git submodule update --init + +# Enables users to activate environment without having to specify the full path +echo "envs_dirs: + - /home/codespace/micromamba/envs" > /opt/conda/.condarc From 4b4390a6d9d403a417018a55b2cc58d2152294fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Thu, 27 Mar 2025 06:21:31 +0100 Subject: [PATCH 2/6] debug --- .devcontainer/setup.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index 95ae8a721de68..ba00f6e59b1f8 100755 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -6,12 +6,11 @@ set -e conda init --all micromamba shell init -s bash -micromamba env create -f build_tools/circle/doc_environment.yml --yes + +# micromamba env create -f build_tools/circle/doc_environment.yml --yes # Note that `micromamba activate sklearn-dev` doesn't work, it must be run by the # user (same applies to `conda activate`) -git submodule update --init - # Enables users to activate environment without having to specify the full path echo "envs_dirs: - /home/codespace/micromamba/envs" > /opt/conda/.condarc From 78b0c48acb159c2e343bada180fa6b733ef0e414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Thu, 27 Mar 2025 06:25:08 +0100 Subject: [PATCH 3/6] fix --- .devcontainer/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index ba00f6e59b1f8..54e5ab4e1503a 100755 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -7,7 +7,7 @@ set -e conda init --all micromamba shell init -s bash -# micromamba env create -f build_tools/circle/doc_environment.yml --yes +micromamba env create -f build_tools/circle/doc_environment.yml -n sklearn-dev --yes # Note that `micromamba activate sklearn-dev` doesn't work, it must be run by the # user (same applies to `conda activate`) From a49efc49b057bf0d3f087dff654a97d1aa9d8815 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Thu, 27 Mar 2025 09:04:17 +0100 Subject: [PATCH 4/6] Try auto activate --- .devcontainer/setup.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index 54e5ab4e1503a..f1f189b141328 100755 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -8,6 +8,8 @@ conda init --all micromamba shell init -s bash micromamba env create -f build_tools/circle/doc_environment.yml -n sklearn-dev --yes +echo "conda activate sklearn-dev >> ~/.bashrc + # Note that `micromamba activate sklearn-dev` doesn't work, it must be run by the # user (same applies to `conda activate`) From f2200d8a4b3bb5936c41e49c40a28180c7c3e85d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Thu, 27 Mar 2025 09:10:39 +0100 Subject: [PATCH 5/6] Comment out for now --- .devcontainer/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index f1f189b141328..9d700f90fab63 100755 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -8,7 +8,7 @@ conda init --all micromamba shell init -s bash micromamba env create -f build_tools/circle/doc_environment.yml -n sklearn-dev --yes -echo "conda activate sklearn-dev >> ~/.bashrc +# echo "conda activate sklearn-dev >> ~/.bashrc # Note that `micromamba activate sklearn-dev` doesn't work, it must be run by the # user (same applies to `conda activate`) From d17806e814ed96d2e16dd8e8fef0ba450418c36e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Thu, 27 Mar 2025 09:15:50 +0100 Subject: [PATCH 6/6] Tweak --- .devcontainer/setup.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/setup.sh b/.devcontainer/setup.sh index 9d700f90fab63..90532c6912a6b 100755 --- a/.devcontainer/setup.sh +++ b/.devcontainer/setup.sh @@ -8,7 +8,7 @@ conda init --all micromamba shell init -s bash micromamba env create -f build_tools/circle/doc_environment.yml -n sklearn-dev --yes -# echo "conda activate sklearn-dev >> ~/.bashrc +echo "micromamba activate sklearn-dev" >> $HOME/.bashrc # Note that `micromamba activate sklearn-dev` doesn't work, it must be run by the # user (same applies to `conda activate`)