-
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.
Merge pull request #290 from una-auxme/277-feature-run-agent-containe…
…r-without-spawning-a-vehicle 277 feature run agent container without spawning a vehicle
- Loading branch information
Showing
11 changed files
with
110 additions
and
18 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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
services: | ||
agent-dev: | ||
build: | ||
dockerfile: build/docker/agent-dev/Dockerfile | ||
context: ../ | ||
args: | ||
- USER_UID=${DOCKER_HOST_UNIX_UID:-1000} | ||
- USER_GID=${DOCKER_HOST_UNIX_GID:-1000} | ||
init: true | ||
tty: true | ||
shm_size: 2gb | ||
deploy: | ||
resources: | ||
reservations: | ||
devices: | ||
- driver: nvidia | ||
capabilities: [ gpu ] | ||
volumes: | ||
- ../:/workspace | ||
environment: | ||
- DISPLAY=${DISPLAY} | ||
network_mode: host | ||
privileged: true | ||
entrypoint: ["/dev_entrypoint.sh"] | ||
command: bash | ||
|
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# syntax = edrevo/dockerfile-plus | ||
|
||
INCLUDE+ ./build/docker/agent/Dockerfile | ||
|
||
# Add development tools | ||
RUN sudo apt-get update && sudo apt-get install -y \ | ||
vim \ | ||
nano \ | ||
tmux \ | ||
git \ | ||
curl \ | ||
htop | ||
|
||
# Create a development entry point script | ||
# RUN echo '#!/bin/bash\n\ | ||
# source /opt/ros/noetic/setup.bash\n\ | ||
# source /catkin_ws/devel/setup.bash\n\ | ||
# exec "$@"' > /dev_entrypoint.sh && \ | ||
# chmod +x /dev_entrypoint.sh | ||
|
||
ADD ./build/docker/agent-dev/dev_entrypoint.sh /dev_entrypoint.sh | ||
|
||
# Set the development entry point | ||
ENTRYPOINT ["/dev_entrypoint.sh"] | ||
|
||
# Default to bash if no command is provided | ||
CMD ["bash"] |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# Source ROS setup | ||
source /opt/ros/noetic/setup.bash | ||
|
||
# Source the catkin workspace setup | ||
source /catkin_ws/devel/setup.bash | ||
|
||
# Set up any additional environment variables if needed | ||
export CARLA_ROOT=/opt/carla | ||
export SCENARIO_RUNNER_ROOT=/opt/scenario_runner | ||
export LEADERBOARD_ROOT=/opt/leaderboard | ||
|
||
# Execute the command passed to the script, or start a bash session if no command was given | ||
if [ $# -eq 0 ]; then | ||
exec bash | ||
else | ||
exec "$@" | ||
fi |
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
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
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
# enable xhost | ||
./xhost_enable.sh | ||
|
||
# run docker compose | ||
if [ $# -eq 0 ]; then | ||
echo "Usage: $0 <path-to-docker-compose-file>" | ||
exit 1 | ||
fi | ||
|
||
docker compose -f "$1" up |