Skip to content

Commit

Permalink
Update playbook and roles for downloading artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzkaganozt committed Jan 31, 2024
1 parent 00dcd04 commit 4e28702
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ansible/playbooks/openadk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,4 @@

# ONNX files and other artifacts
- role: autoware.dev_env.artifacts
when: module == 'dev-tools' or (module == 'all' and install_devel == 'false')
when: prompt_download_artifacts == 'y'
1 change: 0 additions & 1 deletion ansible/roles/geographiclib/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
module: dev-tools
2 changes: 1 addition & 1 deletion ansible/roles/geographiclib/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
ansible.builtin.command:
cmd: geographiclib-get-geoids egm2008-1
creates: /usr/share/GeographicLib/geoids/egm2008-1.pgm
when: module == 'dev-tools' or install_devel== 'false'
when: prompt_download_artifacts == 'y'
6 changes: 3 additions & 3 deletions ansible/roles/nvidia_docker/tasks/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
- name: Add NVIDIA container toolkit repository
become: true
ansible.builtin.apt_repository:
repo: "deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://nvidia.github.io/libnvidia-container/stable/deb/ {{ ansible_distribution_release }} {{ ansible_architecture }}"
repo: deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://nvidia.github.io/libnvidia-container/stable/deb/nvidia-container-toolkit.list
state: present
filename: nvidia-container-toolkit
update_cache: yes
filename: nvidia-container-toolkit.list
update_cache: true

- name: Install NVIDIA Container Toolkit
become: true
Expand Down
6 changes: 3 additions & 3 deletions docker/autoware-openadk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Install development tools and artifacts
RUN --mount=type=ssh \
./setup-dev-env.sh -y --module dev-tools openadk \
./setup-dev-env.sh -y --module dev-tools --download-artifacts openadk \
&& pip uninstall -y ansible ansible-core \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/* "$HOME"/.cache

Expand All @@ -108,10 +108,10 @@ ARG ROS_DISTRO
ARG LIB_DIR
ARG SETUP_ARGS

# Set up runtime environment
# Set up runtime environment and artifacts
COPY autoware.repos /autoware/
RUN --mount=type=ssh \
./setup-dev-env.sh -y --module all ${SETUP_ARGS} --no-cuda-drivers --runtime openadk \
./setup-dev-env.sh -y --module all ${SETUP_ARGS} --download-artifacts --no-cuda-drivers --runtime openadk \
&& pip uninstall -y ansible ansible-core \
&& mkdir src \
&& vcs import src < autoware.repos \
Expand Down
7 changes: 6 additions & 1 deletion setup-dev-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,12 @@ else
fi

# Check downloading artifacts
if [ "$option_yes" = "true" ] || [ "$option_download_artifacts" = "true" ]; then
if [ "$target_playbook" = "autoware.dev_env.openadk" ]; then
if [ "$option_download_artifacts" = "true" ]; then
echo -e "\e[36mArtifacts will be downloaded to $option_data_dir\e[m"
ansible_args+=("--extra-vars" "prompt_download_artifacts=y")
fi
elif [ "$option_yes" = "true" ] || [ "$option_download_artifacts" = "true" ]; then
echo -e "\e[36mArtifacts will be downloaded to $option_data_dir\e[m"
ansible_args+=("--extra-vars" "prompt_download_artifacts=y")
fi
Expand Down

0 comments on commit 4e28702

Please sign in to comment.