Skip to content

Commit

Permalink
added env var for docker environment, waiting for SC and NAND
Browse files Browse the repository at this point in the history
  • Loading branch information
mehulgoel873 committed Jan 11, 2025
1 parent 600cf45 commit 0495c94
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 0 additions & 2 deletions .env.dev
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@ WEBCAM_PORT=/dev/null
RLSENSE_PORT=/dev/null
TEENSY_PORT=/dev/null
FEATHER_PORT=/dev/null
ROOT_DIR="/rb_ws/src/buggy"
SCRIPTS_DIR="$ROOT_DIR/buggy"

3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ RUN echo 'source "/opt/ros/humble/setup.bash" --' >> ~/.bashrc && \
echo 'cd rb_ws' >> ~/.bashrc && \
echo 'colcon build --symlink-install' >> ~/.bashrc && \
echo 'source install/local_setup.bash' >> ~/.bashrc && \
echo 'chmod -R +x src/buggy/scripts/' >> ~/.bashrc
echo 'chmod -R +x src/buggy/scripts/' >> ~/.bashrc && \
echo 'source environments/docker_env.bash' >> ~/.bashrc

# add mouse to tmux
RUN echo 'set -g mouse on' >> ~/.tmux.conf
3 changes: 0 additions & 3 deletions docker-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ services:
env_file: .env.dev
environment:
- DISPLAY=host.docker.internal:0
- ROOT_DIR=${ROOT_DIR:-/rb_ws/src/buggy}
- SCRIPTS_DIR=${SCRIPTS_DIR:-/rb_ws/src/buggy/buggy}
- PYTHONPATH=${SCRIPTS_DIR:-/rb_ws/src/buggy/buggy}
hostname: main
ports:
- "0.0.0.0:8765:8765" # foxglove bridge
Expand Down
4 changes: 4 additions & 0 deletions rb_ws/environments/docker_env.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
export RBROOT=/rb_ws
export PYTHONPATH=$PYTHONPATH:$RBROOT/src/buggy/scripts
export TRAJPATH=$RBROOT/src/buggy/paths/

0 comments on commit 0495c94

Please sign in to comment.