Skip to content

Commit

Permalink
refactor: remove unnecessary files after docker setup (autowarefounda…
Browse files Browse the repository at this point in the history
…tion#258)

* remove SC1091

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* remove unnecessary repositories from apt sources list

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* remove ansible files

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>
  • Loading branch information
kenji-miyake authored May 2, 2022
1 parent 6cdb1b4 commit 22000ee
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions ansible/roles/cuda/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
become: true
ansible.builtin.apt_repository:
repo: deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/{{ cuda_architecture.stdout }}/ /
filename: cuda
state: present

- name: Get dash-case name of cuda_version
Expand Down
12 changes: 9 additions & 3 deletions docker/autoware-universe/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ RUN mkdir -p ~/.ssh \
## Set up development environment
RUN --mount=type=ssh \
./setup-dev-env.sh -y --no-nvidia universe \
&& pip uninstall -y ansible ansible-core \
&& mkdir src \
&& vcs import src < autoware.repos \
&& rosdep update \
Expand All @@ -49,21 +50,26 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install --no-ins
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

## Clean up unnecessary files
RUN rm -rf \
"$HOME"/.cache \
/etc/apt/sources.list.d/cuda.list \
/etc/apt/sources.list.d/docker.list \
/etc/apt/sources.list.d/nvidia-docker.list

## Create entrypoint
# hadolint ignore=SC1091
# hadolint ignore=DL3059
RUN echo "source /opt/ros/${ROS_DISTRO}/setup.bash" > /etc/bash.bashrc
CMD ["/bin/bash"]

FROM devel as prebuilt
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

## Build and change permission for runtime data conversion
# hadolint ignore=SC1091
RUN source /opt/ros/"$ROS_DISTRO"/setup.bash \
&& colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release \
&& find /autoware/install -type d -exec chmod 777 {} \;

## Create entrypoint
# hadolint ignore=SC1091
RUN echo "source /autoware/install/setup.bash" > /etc/bash.bashrc
CMD ["/bin/bash"]

0 comments on commit 22000ee

Please sign in to comment.