mirror of
https://github.com/dragonpilot/dragonpilot.git
synced 2026-06-27 08:52:05 +08:00
021effc5ac
* devcontainer user * cleanup permissions * remove that * remove that since it's not used * clean that up after merge * build base image first * remove the pull * build base image * ensure we can pip install * build base image as batman user * add user uid * add temporary comment about chown instruction
20 lines
604 B
Bash
Executable File
20 lines
604 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
source .devcontainer/.host/.env
|
|
|
|
# override display flag for mac
|
|
if [[ $HOST_OS == darwin ]]; then
|
|
echo "Setting up DISPLAY override for macOS..."
|
|
cat <<EOF >> /root/.bashrc
|
|
if [ -n "\$DISPLAY" ]; then
|
|
DISPLAY_NUM=\$(echo "\$DISPLAY" | awk -F: '{print \$NF}')
|
|
export DISPLAY=host.docker.internal:\$DISPLAY_NUM
|
|
fi
|
|
EOF
|
|
fi
|
|
|
|
# These lines are temporary, to remain backwards compatible with old devcontainers
|
|
# that were running as root and therefore had their caches written as root
|
|
USER=batman
|
|
sudo chown -R $USER: /tmp/scons_cache
|
|
sudo chown -R $USER: /tmp/comma_download_cache |