-
Notifications
You must be signed in to change notification settings - Fork 614
Add initial vscode devcontainer support #1309
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
Conversation
Thank you for the pull request! Is there a way we could test in the CI that this setup is working? All tools that we make use of to develop are tested in the CI to ensure that they work, that users don't spend time on something buggy and that we don't break it in the future. |
I don't know how Microsoft Vscode team test It in CI. /cc @Chuxel any hint? |
Seems to me that the test with the IDE is quite manual: |
@gabrieldemarmiesse What is the scope of https://github.com/tensorflow/addons/blob/master/tools/docker/gpu_tests.Dockerfile#L14-L16. |
Ok I've created another build target inside |
It's to be able to lauch the container easily to run the gpu tests. It's being run with this script in google's CI if you want some background (github actions has no gpu, we need google's ci). |
Ok, I've also edited that script. |
@gabrieldemarmiesse I think it is done. We could just switch the URL before merge when microsoft/vscode-dev-containers#260 is merged upstream. |
Seeing how this has grown into something a lot more complexe, that it's not possible to test automatically in the CI and that this is not critical to be able to work/debug addons with Visual Studio Code, I believe the best course of action is to split this functionality from TF addons. We need to be very selective with what we support. Adding dev code in this repository means that the maintainers are commiting to maintain it for years to come. @bhack , could you either put the dockerfile and json in the https://github.com/microsoft/vscode-dev-containers repo, or create a repo in your account? We can then add a note in the CONTRIBUTING.md of Addons redirecting Visual Studio Code users to your repo. It's then clear who has the responsibility of maintenance/testing/updating/adding new features. If we see that a significant portion of users use this setup (maybe count the number of stars/traffic on the repo?), we can always put it back in Tensorflow Addons to ensure maintenance. |
I think this was a little bit of too expanded generalization. I could add the same tests execution also for The only things that we cannot automate in CI (at least @Chuxel have some internal secrect receipt to pilot cmd
This will not work well in a third party repository cause:
This is |
062dfb3
to
2443c5e
Compare
My last overview is confirmed as you can see in microsoft/vscode-remote-release#2570 (comment) |
@@ -9,5 +9,5 @@ if [ "$DOCKER_BUILDKIT" == "" ]; then | |||
export DOCKER_BUILDKIT=1 | |||
fi | |||
|
|||
docker build -f tools/docker/gpu_tests.Dockerfile -t tfa_gpu_tests ./ | |||
docker build -f tools/docker/gpu_tests.Dockerfile --target gpu_tests -t tfa_gpu_tests ./ | |||
docker run --rm -t --runtime=nvidia tfa_gpu_tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gabrieldemarmiesse Do you want to run this also on interactive_dev
? Or do you want to docker run
something different there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gabrieldemarmiesse An alternative is to execute bazel build --nobuild -- //tensorflow_addons/...
if it is enough for testing interactive_dev
.
Firstly, I want to thank you for working on this @bhack, we very much appreciate the effort to streamline development on TF-Addons. I'm going to address some of your points and then we can work toward a solution.
As a team we've decided that supporting individual IDEs within our repo is outside of what we feel comfortable maintaining. https://github.com/microsoft/vscode-dev-containers/tree/master/containers is a centralized repo for these devcontainers and includes the proper CI to test the underlying functionality within VSCode. Ultimately that is what needs to work and it should be tested.
The decision to include .devcontainer in angular was made by a paid team that decided to support it. As a small team of almost entirely volunteer maintainers I find there little benefit to comparing the commitments they've made to the commitments we should make.
I struggle to see how being selective in what we agree to maintain is a "theoretical" decision. In reality we do not have a "healthy MIA policy" enforced by a team who tracks down negligent maintainers. The only way this repository is viable is if there are maintainers who are willing to serve as a back-up should proxy-maintainers fail. That's a difficult task for a team of volunteers and as such we have a responsibility to make sure we don't over extend ourselves. We've determined that supporting individual IDE components is outside of what we'd like to support.
Ultimately this seems to be the crux of the problem. There already exists a central repository for dev containers and the correct path seems to be removing barriers to get this into the proper place. I've added this topic to the monthly meeting agenda and we'll discuss the best way to publish a developer container for TF-Addons. I can imagine a few different situations where it would be beneficial to have this available (for starters if other IDEs begin copying the devcontainer idea). Would you be willing to re-create your PR to vscode after we've determined the best way to accomplish this? |
Closing this PR as we do not plan to merge this code, but please feel free to continue discussion here. |
@seanmorgan If you never have something in It Is hard to find people interested to maintain It. Let me know when you will have a published Docker image that developer can use at #1414 cause I don't want to maintain a fork of all the current Dockerfile machinery and scripts in the Microsoft repo. |
Initial support for Vscode devcontainer. See #1305