#!/bin/bash set -x Get the actual user info when running with sudo…
- User
#!/bin/bash
set -x
Get the actual user info when running with sudo
ACTUAL_USER={SUDO_USER:-USER} ACTUAL_HOME=ACTUAL_USER | cut -d: -f6) ACTUAL_UID=ACTUAL_USER)
Basic user environment
export LOCAL_USER_ID=(id -g (id -gn $ACTUAL_USER) DOCKER_USER_ARGS="--env LOCAL_USER_ID --env LOCAL_GROUP_ID --env LOCAL_GROUP_NAME"
Display settings
DOCKER_GPU_ARGS="--env DISPLAY --env QT_X11_NO_MITSHM=1 --volume=/tmp/.X11-unix:/tmp/.X11-unix:rw"
Just use basic docker run
DOCKER_COMMAND="docker run"
Network
DOCKER_NETWORK_ARGS="--net host"
Audio - use PulseAudio socket from actual user
PULSE_ARGS="-e PULSE_SERVER=unix:/run/user/ACTUAL_UID/pulse:/run/user/$ACTUAL_UID/pulse"
Add audio group
AUDIO_GROUP_ID=$(getent group audio | cut -d: -f3)
xhost +
DOCKER_USER_ARGS
DOCKER_NETWORK_ARGS
--group-add PULSE_ARGS
-v ACTUAL_HOME/exchange:/home/user/exchange"
-v "(pwd)/src:/src
-it
registry.gitlab.com/brienza1/empower_docker:latest
./src/install-deps.shlast line does not work
Assistant
The issue is with the path to your install-deps.sh script. Since you're mounting your local src directory to /src in the container (with
-v $(pwd)/src:/src), you should use the absolute path:$DOCKER_COMMAND \ $DOCKER_USER_ARGS \ $DOCKER_GPU_ARGS \ $DOCKER_NETWORK_ARGS \ --group-add $AUDIO_GROUP_ID \ --privileged \ $PULSE_ARGS \ -v $ACTUAL_HOME/.config/pulse/cookie:/home/user/.config/pulse/cookie \ -v /dev/snd:/dev/snd \ -v "$ACTUAL_HOME/exchange:/home/user/exchange" \ -v "$PWD/dnd_session.world:/tiago_public_ws/src/pal_gazebo_worlds/worlds/dnd.world" \ -v /var/run/docker.sock:/var/run/docker.sock \ -v $(pwd)/src:/src \ -it \ registry.gitlab.com/brienza1/empower_docker:latest \ /src/install-deps.shWould you like me to explain or break down the code?
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.