devcontainer: use VirtualGL on mac hosts (#30090)
* Install virtualgl in a container
* Initialize virtualgl in bashrc
* Create virtual screen when starting
* Start vglclient on host
* Run Xvfb in separate tmux session to keep it running
* Add note about virtualGL in readme
* Add wget
* source vglrun
* Start xvfb only when forwarding x11
* Remove section about vglrun from readme
* HOST_DISPLAY implementation
* Add MOTD message instead of readme section
old-commit-hash: d15c2d951f
laptop
parent
db839e887d
commit
82ba1dd242
4 changed files with 52 additions and 4 deletions
@ -1,7 +1,15 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
source .devcontainer/.host/.env |
||||
|
||||
# setup safe directories for submodules |
||||
SUBMODULE_DIRS=$(git config --file .gitmodules --get-regexp path | awk '{ print $2 }') |
||||
for DIR in $SUBMODULE_DIRS; do |
||||
git config --global --add safe.directory "$PWD/$DIR" |
||||
done |
||||
|
||||
# virtual display for virtualgl |
||||
if [[ "$HOST_OS" == "darwin" ]] && [[ -n "$HOST_DISPLAY" ]]; then |
||||
echo "Starting virtual display at :99 ..." |
||||
tmux new-session -d -s fakedisplay Xvfb :99 -screen 0 1920x1080x24 |
||||
fi |
||||
|
Loading…
Reference in new issue