Skip to content

Commit

Permalink
Updated Dockerfile for Foxy Implementation (#73)
Browse files Browse the repository at this point in the history
* * Updated Dockerfile to upgrade Numpy to resolve a version conflict with industrial reconstruction.
* Changed the user field to 'root' in docker-compose.yaml to have appropriate permissions to upgrade Numpy.
* Added 'priveleged:true tag to resolve rviz dbus connection bug in docker-compose.yaml.
* Tested in Foxy container.

* Switched image tags from foxy to humble, reverted change from user being root to using the current user id. Added functionality for container to recognize the user name and password.

* Run apt update before installing dependencies

---------

Co-authored-by: Michael Ripperger <[email protected]>
  • Loading branch information
DavidSpielman and marip8 authored Jan 17, 2024
1 parent 73fbaf8 commit aed24e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
9 changes: 4 additions & 5 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,18 @@ ENV DEBIAN_FRONTEND noninteractive
USER root

# Install Python dependencies
RUN python3 -m pip install open3d pyquaternion
RUN python3 -m pip install open3d pyquaternion --upgrade

# Bind mount the source directory so as not to unnecessarily copy source code into the docker image
ARG WORKSPACE_DIR=/opt/snp
RUN --mount=type=bind,target=${WORKSPACE_DIR}/src/snp \
source /opt/tesseract_ros2/install/setup.bash \
apt update -y -qq \
&& source /opt/tesseract_ros2/install/setup.bash \
&& vcs import ${WORKSPACE_DIR}/src < ${WORKSPACE_DIR}/src/snp/dependencies.repos --shallow \
&& rosdep install \
--from-paths ${WORKSPACE_DIR}/src \
-iry \
--skip-keys libvtk \
&& apt install -y \
libxmlrpcpp-dev
--skip-keys libvtk

# Build the repository
# Bind mount the source directory so as not to unnecessarily copy source code into the docker image
Expand Down
5 changes: 4 additions & 1 deletion docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@ services:
NVIDIA_DRIVER_CAPABILITIES: all
ROS_LOG_DIR: /tmp
container_name: snp
image: ghcr.io/ros-industrial-consortium/scan_n_plan_workshop:humble-latest
image: ghcr.io/ros-industrial-consortium/scan_n_plan_workshop:humble-master
stdin_open: true
tty: true
network_mode: host
privileged: true
user: ${CURRENT_UID} # CURRENT_UID=$(id -u):$(id -g)
volumes:
- /tmp/.X11-unix:/tmp/.X11-unix
- /etc/hosts:/etc/hosts
- /etc/passwd:/etc/passwd:ro
- /etc/group:/etc/group:ro
deploy:
resources:
reservations:
Expand Down

0 comments on commit aed24e6

Please sign in to comment.