Skip to content
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

[WIP] Add dev container support #7

Closed
wants to merge 26 commits into from
Closed

Conversation

Huoleit
Copy link
Contributor

@Huoleit Huoleit commented Apr 14, 2024

Summary

Caution

This is a work-in-progress PR. It is still under heavy development. Check the TODO section for tasks done and pending.

In this PR, dev container support is added. The whole dev container is split into two parts.

  • .github/.devcontainer: holds everything needed for the SMB simulation environment. It should be built and uploaded to the GitHub registry by CI. For users who wish to run commands with docker CLI, it is also the image pulled from the register.
  • .devcontainer: It is a top-level dev config that is dedicated to vscode devcontainer extension. It extends the base image and allows users to customize their development environment. For example, add vscode extensions, preserve bash history, etc.

More details here

TODO

  • Add base .devcontainer.json and Dockerfile
  • Add cache-preserving multi-stage build to the base image
  • Add VNC support - Windows and Mac users can fallback to VNC if X11 forwarding does not work
  • Add postCreateCommand.bash to compile catkin_ws
  • Add development tools and vscode extensions
  • Add alias
  • Finalize top-level .devcontainer.json and Dockerfile
  • Add dev container CI
  • Shrink image size (the whole image is 13GB, Pytorch takes 8GB)

@Huoleit Huoleit self-assigned this Apr 14, 2024
Copy link
Contributor

@mantelt mantelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First of all: thanks for looking into this!
I'm new to dev containers, so please be patient ;-)

As pointed out before, I would like to achieve two goals:

  • have some basic CI to make sure everything builds. currently, this is achieved by building smb_dev and SuperMegaBot using Github Actions.

  • distribute a dev environment to the participants that is easy to set up. (I referred to this as deployment, but only now figured out that this might be bad usage of the term)

From what I gathered so far, a dev container is the right way to achieve both goals in one go. But we might need to adjust a few github actions to make everything consistent and keep it efficient.

To me, it feels like it will be more efficient if we quickly discuss your idea on what to implement once more directly. What do you think?

@Huoleit
Copy link
Contributor Author

Huoleit commented Apr 15, 2024

@deepanaishtaweera and I had a meeting about the whole setup a week before. More details are shown in the notes here.
https://onyx-time-1bc.notion.site/Apr-10-2f4f4c13aa624b14a4616886e15601db?pvs=4

@Huoleit Huoleit added the enhancement New feature or request label Apr 15, 2024
@Huoleit
Copy link
Contributor Author

Huoleit commented Apr 15, 2024

First of all: thanks for looking into this! I'm new to dev containers, so please be patient ;-)

As pointed out before, I would like to achieve two goals:

  • have some basic CI to make sure everything builds. currently, this is achieved by building smb_dev and SuperMegaBot using Github Actions.
  • distribute a dev environment to the participants that is easy to set up. (I referred to this as deployment, but only now figured out that this might be bad usage of the term)

From what I gathered so far, a dev container is the right way to achieve both goals in one go. But we might need to adjust a few github actions to make everything consistent and keep it efficient.

To me, it feels like it will be more efficient if we quickly discuss your idea on what to implement once more directly. What do you think?

Sure, we can discuss it and I can give a demo. I'll message you on Slack to schedule a time.

@mantelt mantelt closed this Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants