-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
MNT Add initial setup for devcontainer #31096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Want to make it "not a draft" so we can merge this? |
Done 😉. I was planning to add some minimal doc somewhere, but this can be done in a further PR. |
Maybe we should add some minimal doc first to avoid confusing people. For instance, when opening VS Code on macOS on a latptop with an arm64/M1 processor with the scikit-learn source folder checked out on this branch, VS Code asked me if I wanted to reopen the project within the dev container but then it fails with the following log:
I think this is related to devcontainers/images#545. So maybe we should at least document the purpose of this file, namely, to be used to open the scikit-learn project via the GitHub Codespaces editor. |
I am trying again after editing the json config to use EDIT: the initial setup seems to be fine but you still end-up in a non working env:
So we should definitely manage expectations and let users now that this devcontainer config is only meant to be used via GitHub Codespaces and not intended for local dev with VS Code. |
After a quick conversation with perplexity.ai it seems like there is no way to have a devcontainer setup that is only used by code spaces and does not lead to a prompt by VS Code when used locally. But maybe VS Code remembers your preference? Said differently: it would be nice to have a documentation for people on how to stop VS Code asking you to use a devcontainer every time you start your editor. I tried to experiment with this locally but I never get prompted :-/ Maybe because I don't have docker installed on my laptop? I think having an easy way to avoid being prompted every time would be nice for users (and not trivial to find out how to do this) and would reduce the number of people who use the devcontainer. The latter might be important unless we want people to use the container also locally, in which case we need to somehow get ready to answer questions about things that go wrong. I've used devcontainers a bit for cuml, and while it was nice at first to solve setup problems, over time you discover more and more things that you need to "fix up" (e.g. ssh key forwarding/sharing for signed git commits, accessing local directories with datasets, etc - none of these are rocket science, but also not 1min jobs) |
Instructions how to try it out are in #31091.
I guess let's try to keep feed-back about the user experience in #31091.