Skip to content

Commit

Permalink
Persistence (#23)
Browse files Browse the repository at this point in the history
* Towards melodic persistence

* Inter-dev communication for better external hardware support

* Minor improvements here and there

* Fixed the volume path prefix replacement

* All versions now offer audio support/passthrough

* Added the libuvc usb video driver on ROS2 (humble)

* Fixed hardcoded (by mistake) /var volume

* Updated changelog for v1.4.0
  • Loading branch information
gstavrinos committed May 25, 2023
1 parent 187a43c commit f9a4715
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ or
* [For versions >= `v1.2.2`] There was a problem that was introduced in `v1.2.1` regarding volumes and permissions for user configuration files in ssh, git and bloom. It is now fixed.
* [For versions >= `v1.2.3`] The installer script now checks if the user is in the docker group, and if not adds them and prompts for reboot at the end of the installation.
* [For versions >= `v1.3.0`] A ROS Melodic version is now available (with the `rosezm` command) and a much more robust locking mechanism is now in effect. If you experienced frequent lockouts or race conditions, this version should be more stable.
* [For versions >= `v1.4.0`] All supported ROS versions (melodic/noetic/humble) now work on a completely persistent filesystem to save apt, library and other installations + all other user-defined changes on the container. Additionally, this version also supports audio, enabling users to play sounds through the `rosez` containers.

## Tested platforms
* EndeavourOS
Expand Down
1 change: 0 additions & 1 deletion internal/installer.bash
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ then
sudo usermod -aG docker $USER
need_rr=1
fi
sudo docker volume create $volume
sudo docker build --no-cache --pull -t $image_name -f $SCRIPT_DIR/$dockerfile . --build-arg USER_ID=$(id -u) --build-arg GROUP_ID=$(id -g)
string_for_bashrc='export PATH="$PATH:'$SCRIPT_DIR/"${executable_folder_name}"'"'

Expand Down
19 changes: 19 additions & 0 deletions internal/ros2_Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ RUN mkdir -p /opt/ros/ros2_ws/src && apt-get update && apt-get full-upgrade -y &
gdb \
xterm \
valgrind \
pulseaudio \
mesa-utils \
libuvc-dev \
python3-bloom \
openssh-client \
libgl1-mesa-glx \
python3-catkin-pkg \
ros-humble-gazebo-ros \
ros-humble-navigation2 \
Expand Down Expand Up @@ -38,3 +43,17 @@ USER rosez_user
RUN rosdep update

VOLUME /opt/ros/humble
VOLUME /bin
VOLUME /etc
VOLUME /home
VOLUME /lib
VOLUME /lib64
VOLUME /mnt
VOLUME /opt
VOLUME /root
VOLUME /run
VOLUME /sbin
VOLUME /srv
VOLUME /sys
VOLUME /usr
VOLUME /var
21 changes: 20 additions & 1 deletion internal/ros_Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ RUN mkdir -p /opt/ros/catkin_ws/src && apt-get update && apt-get full-upgrade -y
gdb \
xterm \
valgrind \
pulseaudio \
mesa-utils \
libuvc-dev \
python3-bloom \
python3-catkin-pkg \
openssh-client \
libgl1-mesa-glx \
ros-noetic-amcl \
ros-noetic-moveit \
python3-catkin-pkg \
ros-noetic-move-base \
ros-noetic-navigation \
ros-noetic-gazebo-ros \
Expand All @@ -36,3 +41,17 @@ USER rosez_user
RUN rosdep update

VOLUME /opt/ros/noetic
VOLUME /bin
VOLUME /etc
VOLUME /home
VOLUME /lib
VOLUME /lib64
VOLUME /mnt
VOLUME /opt
VOLUME /root
VOLUME /run
VOLUME /sbin
VOLUME /srv
VOLUME /sys
VOLUME /usr
VOLUME /var
19 changes: 19 additions & 0 deletions internal/ros_melodic_Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ RUN mkdir -p /opt/ros/catkin_ws/src && apt-get update && apt-get full-upgrade -y
gdb \
xterm \
valgrind \
pulseaudio \
mesa-utils \
libuvc-dev \
python-bloom \
openssh-client \
libgl1-mesa-glx \
ros-melodic-amcl \
python-catkin-pkg \
ros-melodic-moveit \
Expand Down Expand Up @@ -36,3 +41,17 @@ USER rosez_user
RUN rosdep update

VOLUME /opt/ros/melodic
VOLUME /bin
VOLUME /etc
VOLUME /home
VOLUME /lib
VOLUME /lib64
VOLUME /mnt
VOLUME /opt
VOLUME /root
VOLUME /run
VOLUME /sbin
VOLUME /srv
VOLUME /sys
VOLUME /usr
VOLUME /var
2 changes: 1 addition & 1 deletion internal/rosez_exec.bash
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ if [ ! -d $ssh_folder ]; then
mkdir $ssh_folder
fi
intermediate_error_handler $?
x=""$(rocker --mode dry-run --network host --x11 $gpu_param --volume $rosez_vol:/opt/ros/$ros/ --volume $SCRIPT_DIR/../includes/$rosws_file:/opt/ros/$rosws_file $volumes $SCRIPT_DIR/../internal/entrypoint.bash:/home/rosez_user/.bashrc $bloom_file:/home/rosez_user/.config/bloom $gitconfig_file:/home/rosez_user/.gitconfig $ssh_folder:/home/rosez_user/.ssh $SCRIPT_DIR/helpers.bash:/home/rosez_user/helpers.bash -- $ros_image:latest | tail -n 1 | sed -e "s/-v .*$rosez_vol:/-v $rosez_vol:/")
x=""$(rocker --mode dry-run --network host --x11 --pulse $gpu_param --volume $rosez_vol-bin:/bin --volume $rosez_vol-etc:/etc/ --volume $rosez_vol-etc:/etc/ --volume $rosez_vol-home:/home/ --volume $rosez_vol-lib:/lib/ --volume $rosez_vol-lib64:/lib64/ --volume $rosez_vol-mnt:/mnt/ --volume $rosez_vol-opt:/opt/ --volume $rosez_vol-root:/root/ --volume $rosez_vol-run:/run/ --volume $rosez_vol-sbin:/sbin/ --volume $rosez_vol-srv:/srv/ --volume $rosez_vol-sys:/sys/ --volume $rosez_vol-usr:/usr --volume $rosez_vol-var:/var --volume $rosez_vol:/opt/ros/$ros --volume $SCRIPT_DIR/../includes/$rosws_file:/opt/ros/$rosws_file $volumes $SCRIPT_DIR/../internal/entrypoint.bash:/home/rosez_user/.bashrc --volume /dev:/dev --volume $bloom_file:/home/rosez_user/.config/bloom --volume $gitconfig_file:/home/rosez_user/.gitconfig --volume $ssh_folder:/home/rosez_user/.ssh --volume $SCRIPT_DIR/helpers.bash:/home/rosez_user/helpers.bash --volume /:$HOME/.$rosez_vol -- $ros_image:latest | tail -n 1 | sed -e "s#-v $(pwd)/$rosez_vol#-v $rosez_vol#g")
intermediate_error_handler $?
xauthf="$((echo \"$x\") | grep -E -o '/tmp/.docker[a-zA-Z0-9_-]+.xauth' | head -1)"
intermediate_error_handler $?
Expand Down

0 comments on commit f9a4715

Please sign in to comment.