Skip to content

Commit

Permalink
dockerfile tag fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
abarbie committed Jun 12, 2024
1 parent 6080ba4 commit 35f81ec
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-arm64v8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]

jobs:
build:
runs-on: self-hosted
runs-on: [self-hosted, Linux, ARM&$]

steps:
- uses: actions/checkout@v2
Expand Down
27 changes: 19 additions & 8 deletions PiCar-X/docker-compose-dtp.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,36 @@
services:
picarx-ds:
build: .
image: abarbie/picarx:${TAG}
environment:
- ROS_HOSTNAME=picarx-ds
- ROS_MASTER_URI=http://picarx-ds:11311
- ROS_HOST_PORT=11311
tty: true
ports:
- 11311:11311
command: roscore
depends_on:
picarx-ds:
condition: service_healthy
healthcheck:
test: [ "CMD-SHELL", "curl $${ROS_MASTER_URI} || exit 1" ]
interval: 5s
timeout: 1s
retries: 5
start_period: 1s

picarx-gazebo:
build:
context: ./simulation
dockerfile: Dockerfile
target: desktop
args:
- TAG=${TAG}
image: abarbie/picarx/picarx-gazebo:${TAG}
env_file:
- ./core/dtp/env/simulation.env
environment:
- DISPLAY=host.docker.internal:0.0
- LIBGL_ALWAYS_INDIRECT=0
- ROS_HOSTNAME=picarx-gazebo
- ROS_MASTER_URI=http://picarx-gazebo:11312
tty: true
ports:
- 11312:11312
Expand Down Expand Up @@ -64,8 +71,12 @@ services:
condition: service_healthy

motor_left-dtp:
build: ./ros/drivers/dcmotor
image: abarbie/picarx/drivers/dcmotor:${TAG}
build:
dockerfile: Dockerfile
context: ./ros/drivers/dcmotor/
args:
- TAG=${TAG}
env_file:
- ./core/dtp/env/picarx.env
tty: true
Expand Down Expand Up @@ -157,7 +168,7 @@ services:
- ./ros/emulators/dcmotor:/root/catkin_ws/src/emulators/dcmotor
command: /bin/bash -c "roslaunch picarx_dcmotor_emulator dcmotor_emulator_left.launch"
depends_on:
picarx-ds:
picarx-gazebo:
condition: service_healthy

motor_emulator_right-dtp:
Expand All @@ -174,7 +185,7 @@ services:
command: /bin/bash -c "roslaunch picarx_dcmotor_emulator dcmotor_emulator_right.launch"

depends_on:
picarx-ds:
picarx-gazebo:
condition: service_healthy

steering_emulator-dtp:
Expand All @@ -195,7 +206,7 @@ services:
- ./ros/emulators/clutchgear:/root/catkin_ws/src/emulators/clutchgear
command: /bin/bash -c "roslaunch picarx_clutchgear_emulator ackermann_clutchgear_emulator.launch"
depends_on:
picarx-ds:
picarx-gazebo:
condition: service_healthy

networks:
Expand Down
13 changes: 6 additions & 7 deletions PiCar-X/simulation/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
ARG TAG=latest

FROM osrf/ros:noetic-desktop-full as gazebo-full

ARG TAG
WORKDIR /root/catkin_ws

RUN apt-get update \
&& apt-get install -y python3-pip python3-setuptools python3-yaml ros-noetic-ros-control ros-noetic-ros-controllers python3-catkin-tools \
&& apt-get clean \
&& update-ca-certificates -f

FROM gazebo:libgazebo11 as gazebo-only

ARG TAG
WORKDIR /root/catkin_ws

RUN apt-get update \
&& apt-get install -y python3-pip python3-setuptools python3-yaml ros-noetic-ros-control ros-noetic-ros-controllers python3-catkin-tools \
&& apt-get clean \
&& update-ca-certificates -f


ARG TAG=latest

FROM gazebo-full as desktop
ARG TAG
COPY --from=abarbie/picarx:${TAG} /root/catkin_ws/ .
COPY ./simulation ./src/simulation

Expand All @@ -30,6 +27,8 @@ RUN /bin/bash -c "source /opt/ros/noetic/setup.bash && catkin config --isolate-d

ENTRYPOINT [ "/root/catkin_ws/src/arches/arches_core/ENTRYPOINT.sh" ]


ARG TAG=latest
FROM gazebo-only as tests
COPY --from=abarbie/picarx:${TAG} /root/catkin_ws/ .
COPY ./simulation ./src/simulation
Expand Down

0 comments on commit 35f81ec

Please sign in to comment.