forked from isaac-sim/IsaacLab
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds X11 forwarding and yaml storage for Docker (isaac-sim#490)
# Description This PR adds the capability to opt-into and use X11 Forwarding from within the container. All of the configuration for the compose network is in `x11.yaml`, the preparation happens in `./container.sh`. Deeper explanation: Instead of attempting to mount an .Xauth directly, we create one ourselves. The `Xauth` cookie is extracted and merged into a new .tmp file which is created on the local user's system. This file is then mounted inside the container,as is the X11 unix socket, and the DISPLAY envvar (as well as a few others to avoid problems) are passed from the host machine into the container. This should work reliably on a container running locally, and it has worked for me over ssh. However, given that ssh can make this quite a bit more complicated, this PR only seeks to support local x11 forwarding. **UPDATE**: I've also added some state persistence through `yq` and the file `.container.yaml`. I am using this to store settings we only want to ask once (`__ORBIT_X11_FORWARDING_ENABLED`) and state that needs to be used by multiple functions (`__ORBIT_TMP_XAUTH`). I added a few helper functions and and installation function to install `yq` for yaml operations. ## Type of change - New feature (non-breaking change which adds functionality) ## Checklist - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./orbit.sh --format` - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] I have run all the tests with `./orbit.sh --test` and they pass - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [x] I have added my name to the `CONTRIBUTORS.md` or my name already exists there --------- Signed-off-by: Hunter Hansen <[email protected]> Co-authored-by: Pascal Roth <[email protected]>
- Loading branch information
1 parent
952498c
commit 2c59cbc
Showing
5 changed files
with
224 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ | |
# Docker/Singularity | ||
**/*.sif | ||
docker/exports/ | ||
docker/.container.yaml | ||
|
||
# IDE | ||
**/.idea/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.