From 1087a7d3c7f1523827566048bfe567f42a3bff31 Mon Sep 17 00:00:00 2001 From: Jacopo Date: Mon, 18 Dec 2023 17:56:25 +0100 Subject: [PATCH] Update images to fix whole pipeline --- .github/workflows/devel.yml | 15 +- .github/workflows/onCodeChanges.yml | 11 +- .github/workflows/release.yml | 14 +- .github/workflows/test.yml | 393 ++++++++++++++++++ .../basic/superbuild-gazebo/Dockerfile | 117 +++--- .../superbuild-gazebo/Dockerfile4Production | 2 +- .../basic/superbuild-gazebo/conf_build.ini | 8 +- .../superbuild-icubhead-withuser/Dockerfile | 66 +-- .../conf_build.ini | 2 +- .../basic/superbuild-icubhead/Dockerfile | 78 ++-- .../basic/superbuild-icubhead/conf_build.ini | 2 +- .../basic/superbuild-icubtest/Dockerfile | 39 +- .../basic/superbuild-icubtest/conf_build.ini | 2 +- .../basic/superbuild-ros2/Dockerfile | 42 +- .../basic/superbuild-ros2/conf_build.ini | 5 +- dockerfile_images/basic/superbuild/Dockerfile | 86 ++-- .../basic/superbuild/Dockerfile4Production | 2 +- .../basic/superbuild/conf_build.ini | 3 +- .../demos/moveit-gazebo/Dockerfile | 71 ++++ .../demos/moveit-gazebo/conf_build.ini | 9 + .../demos/moveit-gazebo}/entrypoint.sh | 0 .../deprecated}/blender/Dockerfile | 0 .../deprecated}/blender/Dockerfile4Production | 0 .../deprecated}/blender/conf_build.ini | 0 .../deprecated}/blender/entrypoint.sh | 0 .../deprecated}/blender/setup.sh | 0 .../deprecated}/funny-things/Dockerfile | 0 .../funny-things/Dockerfile4Production | 0 .../deprecated}/funny-things/conf_build.ini | 0 .../deprecated}/gazebo/Dockerfile | 0 .../deprecated}/gazebo/Dockerfile4Production | 0 .../deprecated}/gazebo/conf_build.ini | 0 .../deprecated}/gazebo/entrypoint.sh | 0 .../deprecated}/gazebo/setup.sh | 0 .../deprecated}/google-vision/Dockerfile | 0 .../google-vision/Dockerfile4Production | 0 .../deprecated}/google-vision/conf_build.ini | 0 .../deprecated}/grasp-gazebo/Dockerfile | 0 .../grasp-gazebo/Dockerfile4Production | 0 .../deprecated}/grasp-gazebo/conf_build.ini | 0 .../deprecated}/grasp-gazebo/entrypoint.sh | 0 .../deprecated}/grasp-gazebo/setup.sh | 0 .../grasp-the-ball-gazebo/Dockerfile | 0 .../Dockerfile4Production | 0 .../grasp-the-ball-gazebo/conf_build.ini | 0 .../deprecated}/grasp-the-ball/Dockerfile | 0 .../grasp-the-ball/Dockerfile4Production | 0 .../deprecated}/grasp-the-ball/conf_build.ini | 0 .../deprecated}/gui-img/Dockerfile4Production | 0 .../deprecated}/gui-img/conf_build.ini | 0 .../deprecated}/human-sensing/Dockerfile | 0 .../human-sensing/Dockerfile4Production | 0 .../deprecated}/human-sensing/conf_build.ini | 0 .../deprecated}/open-face/Dockerfile | 0 .../open-face/Dockerfile4Production | 0 .../deprecated}/open-face/conf_build.ini | 0 .../deprecated}/speech/Dockerfile | 0 .../deprecated}/speech/Dockerfile4Production | 0 .../deprecated}/speech/conf_build.ini | 0 .../deprecated}/speech/startaudio.ini | 0 .../deprecated}/superbuild-google/Dockerfile | 0 .../superbuild-google/Dockerfile4Production | 0 .../superbuild-google/conf_build.ini | 0 .../superbuild-google/entrypoint.sh | 0 .../deprecated}/superbuild-nvidia/Dockerfile | 0 .../superbuild-nvidia/conf_build.ini | 0 .../superbuild-nvidia/entrypoint.sh | 0 .../deprecated}/superbuild-nvidia/setup.sh | 0 .../deprecated}/superbuild-pytorch/Dockerfile | 0 .../superbuild-pytorch/Dockerfile4Production | 0 .../superbuild-pytorch/conf_build.ini | 0 .../superbuild-pytorch/entrypoint.sh | 0 .../deprecated}/superbuild-pytorch/setup.sh | 0 .../deprecated}/superbuild-ros1/Dockerfile | 0 .../superbuild-ros1/Dockerfile4Production | 0 .../superbuild-ros1/conf_build.ini | 0 .../deprecated/superbuild-ros1/entrypoint.sh | 15 + .../deprecated}/superbuild-ros1/setup.sh | 0 .../superbuild-tensorflow-cpu/Dockerfile | 0 .../Dockerfile4Production | 0 .../superbuild-tensorflow-cpu/conf_build.ini | 0 .../superbuild-tensorflow-cpu/entrypoint.sh | 0 .../superbuild-tensorflow-cpu/setup.sh | 0 .../superbuild-tensorflow-gpu/Dockerfile | 0 .../Dockerfile4Production | 0 .../superbuild-tensorflow-gpu/conf_build.ini | 0 .../superbuild-tensorflow-gpu/entrypoint.sh | 0 .../superbuild-tensorflow-gpu/setup.sh | 0 .../deprecated}/supervise-calib/Dockerfile | 0 .../supervise-calib/Dockerfile4Production | 0 .../supervise-calib/conf_build.ini | 0 91 files changed, 760 insertions(+), 222 deletions(-) create mode 100644 .github/workflows/test.yml create mode 100644 dockerfile_images/demos/moveit-gazebo/Dockerfile create mode 100644 dockerfile_images/demos/moveit-gazebo/conf_build.ini rename {deprecated_images/superbuild-ros1 => dockerfile_images/demos/moveit-gazebo}/entrypoint.sh (100%) rename {deprecated_images => dockerfile_images/deprecated}/blender/Dockerfile (100%) rename {deprecated_images => dockerfile_images/deprecated}/blender/Dockerfile4Production (100%) rename {deprecated_images => dockerfile_images/deprecated}/blender/conf_build.ini (100%) rename {deprecated_images => dockerfile_images/deprecated}/blender/entrypoint.sh (100%) rename {deprecated_images => dockerfile_images/deprecated}/blender/setup.sh (100%) rename {deprecated_images => dockerfile_images/deprecated}/funny-things/Dockerfile (100%) rename {deprecated_images => dockerfile_images/deprecated}/funny-things/Dockerfile4Production (100%) rename {deprecated_images => dockerfile_images/deprecated}/funny-things/conf_build.ini (100%) rename {deprecated_images => dockerfile_images/deprecated}/gazebo/Dockerfile (100%) rename {deprecated_images => dockerfile_images/deprecated}/gazebo/Dockerfile4Production (100%) rename {deprecated_images => dockerfile_images/deprecated}/gazebo/conf_build.ini (100%) rename {deprecated_images => dockerfile_images/deprecated}/gazebo/entrypoint.sh (100%) rename {deprecated_images => dockerfile_images/deprecated}/gazebo/setup.sh (100%) rename {deprecated_images => dockerfile_images/deprecated}/google-vision/Dockerfile (100%) rename {deprecated_images => dockerfile_images/deprecated}/google-vision/Dockerfile4Production (100%) rename {deprecated_images => dockerfile_images/deprecated}/google-vision/conf_build.ini (100%) rename {deprecated_images => dockerfile_images/deprecated}/grasp-gazebo/Dockerfile (100%) rename {deprecated_images => dockerfile_images/deprecated}/grasp-gazebo/Dockerfile4Production (100%) rename {deprecated_images => dockerfile_images/deprecated}/grasp-gazebo/conf_build.ini (100%) rename {deprecated_images => dockerfile_images/deprecated}/grasp-gazebo/entrypoint.sh (100%) rename {deprecated_images => dockerfile_images/deprecated}/grasp-gazebo/setup.sh (100%) rename {deprecated_images => dockerfile_images/deprecated}/grasp-the-ball-gazebo/Dockerfile (100%) rename {deprecated_images => dockerfile_images/deprecated}/grasp-the-ball-gazebo/Dockerfile4Production (100%) rename {deprecated_images => dockerfile_images/deprecated}/grasp-the-ball-gazebo/conf_build.ini (100%) rename {deprecated_images => dockerfile_images/deprecated}/grasp-the-ball/Dockerfile (100%) rename {deprecated_images => dockerfile_images/deprecated}/grasp-the-ball/Dockerfile4Production (100%) rename {deprecated_images => dockerfile_images/deprecated}/grasp-the-ball/conf_build.ini (100%) rename {deprecated_images => dockerfile_images/deprecated}/gui-img/Dockerfile4Production (100%) rename {deprecated_images => dockerfile_images/deprecated}/gui-img/conf_build.ini (100%) rename {deprecated_images => dockerfile_images/deprecated}/human-sensing/Dockerfile (100%) rename {deprecated_images => dockerfile_images/deprecated}/human-sensing/Dockerfile4Production (100%) rename {deprecated_images => dockerfile_images/deprecated}/human-sensing/conf_build.ini (100%) rename {deprecated_images => dockerfile_images/deprecated}/open-face/Dockerfile (100%) rename {deprecated_images => dockerfile_images/deprecated}/open-face/Dockerfile4Production (100%) rename {deprecated_images => dockerfile_images/deprecated}/open-face/conf_build.ini (100%) rename {deprecated_images => dockerfile_images/deprecated}/speech/Dockerfile (100%) rename {deprecated_images => dockerfile_images/deprecated}/speech/Dockerfile4Production (100%) rename {deprecated_images => dockerfile_images/deprecated}/speech/conf_build.ini (100%) rename {deprecated_images => dockerfile_images/deprecated}/speech/startaudio.ini (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-google/Dockerfile (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-google/Dockerfile4Production (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-google/conf_build.ini (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-google/entrypoint.sh (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-nvidia/Dockerfile (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-nvidia/conf_build.ini (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-nvidia/entrypoint.sh (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-nvidia/setup.sh (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-pytorch/Dockerfile (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-pytorch/Dockerfile4Production (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-pytorch/conf_build.ini (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-pytorch/entrypoint.sh (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-pytorch/setup.sh (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-ros1/Dockerfile (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-ros1/Dockerfile4Production (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-ros1/conf_build.ini (100%) create mode 100755 dockerfile_images/deprecated/superbuild-ros1/entrypoint.sh rename {deprecated_images => dockerfile_images/deprecated}/superbuild-ros1/setup.sh (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-tensorflow-cpu/Dockerfile (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-tensorflow-cpu/Dockerfile4Production (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-tensorflow-cpu/conf_build.ini (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-tensorflow-cpu/entrypoint.sh (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-tensorflow-cpu/setup.sh (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-tensorflow-gpu/Dockerfile (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-tensorflow-gpu/Dockerfile4Production (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-tensorflow-gpu/conf_build.ini (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-tensorflow-gpu/entrypoint.sh (100%) rename {deprecated_images => dockerfile_images/deprecated}/superbuild-tensorflow-gpu/setup.sh (100%) rename {deprecated_images => dockerfile_images/deprecated}/supervise-calib/Dockerfile (100%) rename {deprecated_images => dockerfile_images/deprecated}/supervise-calib/Dockerfile4Production (100%) rename {deprecated_images => dockerfile_images/deprecated}/supervise-calib/conf_build.ini (100%) diff --git a/.github/workflows/devel.yml b/.github/workflows/devel.yml index 329309e..a369e1f 100644 --- a/.github/workflows/devel.yml +++ b/.github/workflows/devel.yml @@ -11,15 +11,24 @@ jobs: name: build devel and master images runs-on: ubuntu-latest steps: + - name: Get Token + id: get_workflow_token + uses: tibdex/github-app-token@v2 + with: + private_key: ${{ secrets.ICUB_TECH_IIT_APP_KEY }} + app_id: ${{ secrets.ICUB_TECH_IIT_APP_ID }} + installation_retrieval_mode: repository + installation_retrieval_payload: icub-tech-iit/code + - name: Checkout docker-deployment-images uses: actions/checkout@v4 - name: Repository Dispatch for building images - uses: peter-evans/repository-dispatch@v2 + uses: peter-evans/repository-dispatch@v3 env: GITHUB_APPS_TOKEN: ${{ steps.get_workflow_token.outputs.token }} with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_APPS_TOKEN }} repository: ${{ github.repository }} event-type: cron_trigger - client-payload: '{"version": "master", "type": "cron_trigger", "img_list": "superbuild superbuild-tensorflow-cpu superbuild-tensorflow-gpu superbuild-icubhead superbuild-icubhead-withuser superbuild-nvidia superbuild-nvidia-10.1 superbuild-gazebo blender gazebo superbuild-ros2"}' + client-payload: '{"version": "master", "type": "cron_trigger", "img_list": "superbuild superbuild-icubhead superbuild-icubhead-withuser superbuild-gazebo superbuild-ros2"}' diff --git a/.github/workflows/onCodeChanges.yml b/.github/workflows/onCodeChanges.yml index 1d9165f..5196dc2 100644 --- a/.github/workflows/onCodeChanges.yml +++ b/.github/workflows/onCodeChanges.yml @@ -333,10 +333,11 @@ jobs: ##################### Command to set the tag for the date argument ###################### - name: set date argument for Docker build + id: get_date run: | echo "$(date +'%d/%m/%Y')" > DATE_ echo "metadata=$(cat DATE_)" > DATE_TAG - echo $(cat DATE_TAG) + echo $(cat DATE_TAG) >> $GITHUB_OUTPUT ##################### Here we check the release version and replace Custom with stable only for the image name ###################### - name: Get release / master version @@ -536,7 +537,7 @@ jobs: # - name: Trigger testing pipeline for source image # if: steps.build-sources.outcome == 'success' && steps.push-sources.outcome == 'success' && steps.get_args.outputs.demos_flag_output == 'true' && ! cancelled() - # uses: peter-evans/repository-dispatch@v1 + # uses: peter-evans/repository-dispatch@v3 # with: # token: ${{ secrets.GITHUB_TOKEN }} # repository: {{ }} @@ -545,7 +546,7 @@ jobs: # - name: Trigger testing pipeline for binary image # if: steps.build-binaries.outcome == 'success' && steps.push-binaries.outcome == 'success' && steps.get_args.outputs.demos_flag_output == 'true' && ! cancelled() - # uses: peter-evans/repository-dispatch@v1 + # uses: peter-evans/repository-dispatch@v3 # with: # token: ${{ secrets.GITHUB_TOKEN }} # repository: {{ }} @@ -799,7 +800,7 @@ jobs: # this step ensures that the children are built with the "release" version, which is used when the "repository_trigger" is sent - name: Repository Dispatch for release if: github.event.client_payload.type == 'repository_trigger' - uses: peter-evans/repository-dispatch@v2 + uses: peter-evans/repository-dispatch@v3 with: token: ${{ secrets.GITHUB_TOKEN }} repository: ${{ env.REPOSITORY_NAME }} @@ -809,7 +810,7 @@ jobs: # in the case where we are building "master" versions, we need to send a trigger that build only master, e.g.: "cron_trigger" - name: Repository Dispatch for master if: github.event.client_payload.type != 'repository_trigger' - uses: peter-evans/repository-dispatch@v2 + uses: peter-evans/repository-dispatch@v3 with: token: ${{ secrets.GITHUB_TOKEN }} repository: ${{ env.REPOSITORY_NAME }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 313904e..924e7c2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,6 +20,14 @@ jobs: name: Create Release runs-on: ubuntu-latest steps: + - name: Get Token + id: get_workflow_token + uses: tibdex/github-app-token@v2 + with: + private_key: ${{ secrets.ICUB_TECH_IIT_APP_KEY }} + app_id: ${{ secrets.ICUB_TECH_IIT_APP_ID }} + installation_retrieval_mode: repository + installation_retrieval_payload: icub-tech-iit/code - name: Checkout code uses: actions/checkout@v4 - name: Get Version @@ -66,7 +74,7 @@ jobs: #prerelease: false # - name: Repository Dispatch for appsAway - # uses: peter-evans/repository-dispatch@v1 + # uses: peter-evans/repository-dispatch@v3 # env: # GITHUB_APPS_TOKEN: ${{ steps.get_workflow_token.outputs.token }} # with: @@ -76,11 +84,11 @@ jobs: # client-payload: '{"version": "${{ github.event.client_payload.version }}"}' - name: Repository Dispatch for building images - uses: peter-evans/repository-dispatch@v2 + uses: peter-evans/repository-dispatch@v3 env: GITHUB_APPS_TOKEN: ${{ steps.get_workflow_token.outputs.token }} with: - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_APPS_TOKEN }} repository: ${{ env.REPOSITORY_NAME }} event-type: repository_trigger client-payload: '{"version": "${{ steps.get_version.outputs.version }}", "type": "repository_trigger", "img_list": "superbuild superbuild-icubhead superbuild-icubhead-withuser superbuild-gazebo superbuild-ros2"}' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..9d1c078 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,393 @@ +name: Test + +on: + workflow_dispatch: + inputs: + branch: + description: 'branch to use' + required: true + default: 'feature/**' + type: choice + options: + - master + - feature/** + push: + branches: + - master + - 'feature/**' + repository_dispatch: + types: [repository_trigger] + +env: + REGISTRY: ghcr.io + REPOSITORY_NAME: ${{ github.repository }} + REPOSITORY_OWNER: ${{ github.repository_owner }} + DOCKERHUB_OWNER: ${{ secrets.DOCKERHUB_USERNAME }} + DEFAULT_USER: defaultuser + IMAGE_PREFIX: cd_ + SUPERBUILD_TAG: v2023.08.0 + +jobs: + check_files: + runs-on: [ubuntu-latest] + steps: + - id: file_changes + if: github.event_name == 'push' + uses: trilom/file-changes-action@v1.2.4 + - name: files + if: github.event_name == 'push' + id: check-modifications + run: | + cat $HOME/files.json + cat $HOME/files_modified.json + cat $HOME/files_added.json + echo '${{ steps.file_changes.outputs.files}}' + echo '${{ steps.file_changes.outputs.files_modified}}' + echo '${{ steps.file_changes.outputs.files_added}}' + - uses: actions/checkout@v4 + - name: find app name + id: set-matrix + run: | + if [[ "${{github.event_name}}" == "push" ]] + then + parsed_list=($(echo '${{ steps.file_changes.outputs.files}}' | tr ',' '\n')) + fi + superbuild_matrix="" + children_matrix="" + superbuild_flag=false + children_flag=false + children_flag_output=false + iter_superbuild=0 + iter_children=0 + for i in "${parsed_list[@]}" + do + folder=$(echo $i | awk -F'/' '{print $1}' | tr -d '"' | tr -d '[' | tr -d ']') + if [ "$folder" == "dockerfile_images/basic" ] + then + element=$(echo $i | awk -F'/' '{print $3}' | tr -d '"' | tr -d '[' | tr -d ']') + image_path=dockerfile_images/$(echo $i | awk -F'/' '{print $2}' | tr -d '"' | tr -d '[' | tr -d ']') + element_flag=false + children_flag=false + children_image_flag=false + while read -r line || [ -n "$line" ] + do + if [ "$line" == "[superbuild]" ] + then + superbuild_flag=true + element_flag=true + fi + if [ "$line" == "[sources]" ] || [ "$line" == "[binaries]" ] || [ "$line" == "[tag]" ] || [ "$line" == "[superbuild]" ] || [ "$line" == "[demos]" ] || [ "$line" == "" ] + then + children_flag=false + fi + if [ $children_flag == true ] + then + if [ $iter_children == 0 ] + then + children_flag_output=true + children_matrix="$line" + iter_children=$((iter_children+1)) + else + children_matrix="$children_matrix $line" + fi + fi + if [ "$line" == "[children]" ] + then + echo "children found" + children_flag=true + children_image_flag=true + fi + done < $image_path/$element/conf_build.ini + echo $children_image_flag + if [[ $element_flag == true ]] + then + if [ $iter_superbuild == 0 ] + then + superbuild_matrix="$element" + iter_superbuild=$((iter_superbuild+1)) + else + superbuild_matrix="$superbuild_matrix $element" + fi + fi + fi + done + children_matrix="$children_matrix" + children_matrix_list=( $children_matrix ) + + superbuild_matrix=( $superbuild_matrix ) + new_superbuild_matrix="" + echo "this is the list without @ $superbuild_matrix" + echo "this is the list with @ ${superbuild_matrix[@]}" + + for elem_1 in "${superbuild_matrix[@]}" + do + echo "this is element 1 $elem_1" + is_children=false + for elem_2 in "${children_matrix_list[@]}" + do + echo "this is element 2 $elem_2" + if [ "$elem_2" == "$elem_1" ] + then + is_children=true + echo "$elem_1 is children" + break + fi + done + if ( ! $is_children ) + then + if [ "$new_superbuild_matrix" == "" ] + then + new_superbuild_matrix="\"$elem_1\"" + else + new_superbuild_matrix="$new_superbuild_matrix \"$elem_1\"" + fi + fi + done + echo "this is after the loop ${new_superbuild_matrix[@]}" + superbuild_matrix_temp=$(echo "${new_superbuild_matrix[@]}" | tr ' ' '\n' | sort -u | tr '\n' ',') + superbuild_final_matrix="[ $(echo "${superbuild_matrix_temp[@]}")" + superbuild_final_matrix="$(echo ${superbuild_final_matrix::-1}) ]" + + version_matrix="[ \"master\" ]" + + echo "superbuild matrix: $superbuild_final_matrix" + echo "superbuild build: $superbuild_flag" + echo "children: ${children_matrix[@]}" + echo "children_flag build: $children_flag" + echo "children_flag_output: $children_flag_output" + echo "superbuild_matrix=$superbuild_final_matrix" >> $GITHUB_OUTPUT + echo "superbuild_flag=$superbuild_flag" >> $GITHUB_OUTPUT + echo "paths=${parsed_list[@]}" >> $GITHUB_OUTPUT + echo "children_matrix=${children_matrix}" >> $GITHUB_OUTPUT + echo "children_flag_output=$children_flag_output" >> $GITHUB_OUTPUT + echo "version=$version_matrix" >> $GITHUB_OUTPUT + + outputs: + superbuild_matrix: ${{ steps.set-matrix.outputs.superbuild_matrix }} + superbuild_flag: ${{ steps.set-matrix.outputs.superbuild_flag }} + paths: ${{ steps.set-matrix.outputs.paths }} + children_matrix: ${{ steps.set-matrix.outputs.children_matrix }} + children_flag: ${{ steps.set-matrix.outputs.children_flag_output }} + version: ${{ steps.set-matrix.outputs.version }} + + build_and_push: + runs-on: [ubuntu-latest] + needs: check_files + if: needs.check_files.outputs.superbuild_flag == 'true' + strategy: + matrix: + apps: ${{fromJson(needs.check_files.outputs.superbuild_matrix)}} + version: ${{fromJson(needs.check_files.outputs.version)}} + tag: [Stable, Unstable] + fail-fast: false + + steps: + - name: Print app name + run: echo ${{matrix.apps}} && echo ${{matrix.version}} && echo ${{matrix.tag}} + + ######################################################################################### + + - uses: actions/checkout@v4 + with: + ref: ${{github.sha}} + fetch-depth: 0 + + + ######################################################################################### + + - name: Log in to the Container registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + ##################### Command to set the tag for the date argument ###################### + - name: Set date argument for Docker build + id: get_date + run: | + echo "DATE_HOUR=$( date +'%d-%m-%Y_%H:%M:%S' )" >> $GITHUB_OUTPUT + + ##################### Here we check the release version and replace Custom with stable only for the image name ###################### + - name: Get release / master version + id: get_version + run: | + echo "VERSION=$( echo \"master\" )" >> $GITHUB_OUTPUT + echo "TAG=$(echo \"-${{matrix.tag}}\" | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT + + - name: Get path + id: get_path + run: | + for j in ${{needs.check_files.outputs.paths}} + do + if [ $(echo $j | awk '/'"${{matrix.apps}}"'/') ] + then + path="dockerfile_images/$(echo $j | awk -F'/' '{print $2}' | tr -d '"')" + echo "PATH=$path" >> $GITHUB_OUTPUT + exit 0 + fi + done + + - name: Get Build Arguments + id: get_args + run: | + start_img="" + source_img="" + sources_args="" + binaries_args="" + tag_arg="" + sources_flag=false + binaries_flag=false + tag_flag=false + tag_github_flag=false + compile_sources=false + compile_binaries=false + demos_matrix="" + demos_flag=false + demos_flag_output=false + iter_demos=0 + + echo "{{matrix.tag}} - ${{matrix.tag}}" + echo "{{steps.get_version.outputs.TAG}} - ${{steps.get_version.outputs.TAG}}" + echo "{{matrix.version}} - ${{matrix.version}}" + echo "{{matrix.apps}} - ${{matrix.apps}}" + echo "{{steps.get_version.outputs.VERSION}} - ${{steps.get_version.outputs.VERSION}}" + echo "{{steps.get_date.outputs.DATE_HOUR}} - ${{steps.get_date.outputs.DATE_HOUR}}" + echo "{{env.DEFAULT_USER}} - ${{env.DEFAULT_USER}}" + while read -r line || [ -n "$line" ] + do + echo "line is $line" + line=$(echo "$line" > temp.tmp && sed -i 's/{{matrix.tag}}/${{matrix.tag}}/g' temp.tmp && cat temp.tmp) + line=$(echo "$line" > temp.tmp && sed -i 's/{{steps.get_version.outputs.TAG}}/${{steps.get_version.outputs.TAG}}/g' temp.tmp && cat temp.tmp) + line=$(echo "$line" > temp.tmp && sed -i 's/{{matrix.version}}/${{matrix.version}}/g' temp.tmp && cat temp.tmp) + line=$(echo "$line" > temp.tmp && sed -i 's/{{matrix.apps}}/${{matrix.apps}}/g' temp.tmp && cat temp.tmp) + line=$(echo "$line" > temp.tmp && sed -i 's/{{steps.get_version.outputs.VERSION}}/${{steps.get_version.outputs.VERSION}}/g' temp.tmp && cat temp.tmp) + line=$(echo "$line" > temp.tmp && sed -i 's/{{steps.get_date.outputs.DATE_HOUR}}/${{steps.get_date.outputs.DATE_HOUR}}/g' temp.tmp && cat temp.tmp) + line=$(echo "$line" > temp.tmp && sed -i 's/{{env.REGISTRY}}/${{env.REGISTRY}}/g' temp.tmp && cat temp.tmp) + line=$(echo "$line" > temp.tmp && sed -i 's@{{env.REPOSITORY_NAME}}@${{env.REPOSITORY_NAME}}@g' temp.tmp && cat temp.tmp) + line=$(echo "$line" > temp.tmp && sed -i 's/{{env.IMAGE_PREFIX}}/${{env.IMAGE_PREFIX}}/g' temp.tmp && cat temp.tmp) + line=$(echo "$line" > temp.tmp && sed -i 's/{{env.REPOSITORY_OWNER}}/${{env.REPOSITORY_OWNER}}/g' temp.tmp && cat temp.tmp) + line=$(echo "$line" > temp.tmp && sed -i 's/{{env.DEFAULT_USER}}/${{env.DEFAULT_USER}}/g' temp.tmp && cat temp.tmp) + line=$(echo "$line" > temp.tmp && sed -i 's/{{env.SUPERBUILD_TAG}}/${{env.SUPERBUILD_TAG}}/g' temp.tmp && cat temp.tmp) + echo "dopo line is $line" + if [ "$line" == "[sources]" ] + then + sources_flag=true + binaries_flag=false + tag_flag=false + compile_sources=true + demos_flag=false + fi + if [ "$line" == "[binaries]" ] + then + sources_flag=false + binaries_flag=true + tag_flag=false + compile_binaries=false + demos_flag=false + fi + if [ "$line" == "[tag]" ] + then + sources_flag=false + binaries_flag=false + tag_flag=true + demos_flag=false + fi + if [ "$line" == "[children]" ] + then + sources_flag=false + binaries_flag=false + tag_flag=false + demos_flag=false + fi + if [ $demos_flag == true ] + then + if [ $iter_demos == 0 ] + then + demos_flag_output=true + demos_matrix="$line" + iter_demos=$((iter_demos+1)) + else + demos_matrix="$demos_matrix $line" + fi + fi + if [ "$line" == "[demos]" ] + then + sources_flag=false + binaries_flag=false + tag_flag=false + demos_flag=true + fi + if [ "$line" != "[sources]" ] && [ "$line" != "[binaries]" ] && [ "$line" != "[tag]" ] && [ "$line" != "[superbuild]" ] && [ "$line" != "[children]" ] && [ "$line" != "[demos]" ] && [ "$line" != "" ] + then + if [[ $sources_flag != false ]] + then + sources_args="$sources_args --build-arg \"$line\"" + fi + if [[ $binaries_flag != false ]] + then + binaries_args="" + fi + if [[ $tag_flag != false ]] + then + tag_arg="--tag ${{env.DEFAULT_USER}}/\"$line" + img_name="\"$line" + fi + fi + done < ${{ steps.get_path.outputs.PATH }}/${{matrix.apps}}/conf_build.ini + demos_matrix=$(echo "${demos_matrix[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' ') + demos_matrix="$(echo ${demos_matrix::-1})" + echo "SRC_ARGS=$sources_args" >> $GITHUB_OUTPUT + echo "TAG_ARGS=$tag_arg" >> $GITHUB_OUTPUT + echo "IMG_NAME=$img_name" >> $GITHUB_OUTPUT + echo "CMPL_SRC=$compile_sources" >> $GITHUB_OUTPUT + echo "demos_matrix=${demos_matrix[@]}" >> $GITHUB_OUTPUT + echo "demos_flag_output=$demos_flag_output" >> $GITHUB_OUTPUT + echo "sources: $sources_args" + echo "cmpl sources: $compile_sources" + echo "cmpl tag: $tag_arg" + echo "demo matrix: ${demos_matrix[@]}" + + - name: Build Docker sources images + id: build-sources + if: steps.get_args.outputs.CMPL_SRC == 'true' + run: docker build ${{ steps.get_args.outputs.SRC_ARGS }} --no-cache ${{ steps.get_path.outputs.PATH }}/${{matrix.apps}} --file ${{ steps.get_path.outputs.PATH }}/${{matrix.apps}}/Dockerfile ${{ steps.get_args.outputs.TAG_ARGS }}_sources" + + + - name: Tag source images for Ghcr.io + id: tag-sources-ghcr + if: steps.get_args.outputs.CMPL_SRC == 'true' + run: docker tag ${{env.DEFAULT_USER}}/${{ steps.get_args.outputs.IMG_NAME }}_sources" ${{ env.REGISTRY }}/${{ env.REPOSITORY_NAME }}/${{ env.IMAGE_PREFIX }}${{ steps.get_args.outputs.IMG_NAME }}_sources" + + outputs: + img_name: ${{ steps.get_args.outputs.IMG_NAME }} + version_name: ${{ steps.get_version.outputs.VERSION }} + tag_name: ${{ steps.get_version.outputs.TAG }} + metatadata_name: ${{ steps.get_date.outputs.DATE_HOUR }} + + trigger_children_build: + runs-on: [ubuntu-latest] + needs: [build_and_push, check_files] + if: always() && needs.check_files.outputs.children_flag == 'true' && ! cancelled() + steps: + - name: Get Token + id: get_workflow_token + uses: tibdex/github-app-token@v2 + with: + private_key: ${{ secrets.ICUB_TECH_IIT_APP_KEY }} + app_id: ${{ secrets.ICUB_TECH_IIT_APP_ID }} + installation_retrieval_mode: repository + installation_retrieval_payload: icub-tech-iit/code + # this step ensures that the children are built with the "release" version, which is used when the "repository_trigger" is sent + - name: Repository Dispatch for release + if: github.event.client_payload.type == 'repository_trigger' + uses: peter-evans/repository-dispatch@v3 + env: + GITHUB_APPS_TOKEN: ${{ steps.get_workflow_token.outputs.token }} + with: + token: ${{ secrets.GITHUB_APPS_TOKEN }} + repository: ${{ env.REPOSITORY_NAME }} + event-type: repository_trigger + client-payload: '{"repo": {"name": "${{ github.repository }}", "branch": "feature/updateImages" },"version": "${{ github.event.client_payload.version }}", "type": "repository_trigger", "img_list": "${{ needs.check_files.outputs.children_matrix }}"}' + + \ No newline at end of file diff --git a/dockerfile_images/basic/superbuild-gazebo/Dockerfile b/dockerfile_images/basic/superbuild-gazebo/Dockerfile index 7c96860..0bc740b 100644 --- a/dockerfile_images/basic/superbuild-gazebo/Dockerfile +++ b/dockerfile_images/basic/superbuild-gazebo/Dockerfile @@ -1,11 +1,11 @@ ARG START_IMG="none" ARG PROJECTS_DIR=/projects -ARG INSTALL_DIR="/usr/local" +ARG INSTALL_DIR=/usr/local ARG ROBOTOLOGY_INITIALIZATION_FILE=/usr/local/bin/setup_robotology_tdd.sh ARG METADATA_FILE=/usr/local/bin/setup_metadata.sh ARG GAZEBO_VER=11 -ARG release="master" -ARG sbtag="Unstable" +ARG release="none" +ARG sbtag="none" ARG metadata="none" # Start from a ubuntu image plus mesa library recompiled with specific configuration @@ -17,10 +17,11 @@ ENV DEBIAN_FRONTEND=noninteractive # Some definitions ARG CMAKE_GENERATOR="Unix Makefiles" -ARG SOURCES_BUILD_TYPE=RelWithDebInfo -ARG CMAKE_EXTRA_OPTIONS=-j2 +# ARG SOURCES_BUILD_TYPE=RelWithDebInfo +ARG CMAKE_EXTRA_OPTIONS=-j4 ARG BUILD_TYPE=Release - # Variables defined before the first FROM can be accessed in all stages but they need to be re-declared + +# Variables defined before the first FROM can be accessed in all stages but they need to be re-declared ARG GAZEBO_VER ARG release ARG sbtag @@ -28,10 +29,10 @@ ARG PROJECTS_DIR ARG INSTALL_DIR - # Create a new runtimeusers group +# Create a new runtimeusers group (why we are doing this) RUN groupadd -K GID_MIN=100 -K GID_MAX=499 runtimeusers - # Install dependencies given in documentation in superbuild +# Install dependencies given in documentation in superbuild RUN mkdir -p /etc/bash_completion.d/ && \ # apt-get update and apt-get install should always be in the same layer to prevent caching errors apt-get update && \ @@ -47,24 +48,21 @@ RUN mkdir -p /etc/bash_completion.d/ && \ lsb-release \ vim - # Get gazebo from the osrf repo -RUN echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" \ - > /etc/apt/sources.list.d/gazebo-stable.list &&\ - wget http://packages.osrfoundation.org/gazebo.key -O - | apt-key add - &&\ - apt-get update &&\ - apt install -y gazebo${GAZEBO_VER} libgazebo${GAZEBO_VER}-dev +# Get gazebo from apt +RUN apt-get update &&\ + apt install -y gazebo libgazebo-dev libgazebo${GAZEBO_VER} RUN mkdir ${PROJECTS_DIR} && cd ${PROJECTS_DIR} &&\ # Clone relevant repos git clone https://github.com/robotology/robotology-superbuild.git &&\ - git clone https://github.com/robotology/cer.git &&\ - git clone https://github.com/robotology/cer-sim.git &&\ - git clone https://github.com/robotology/navigation.git &&\ + # git clone https://github.com/robotology/cer.git &&\ + # git clone https://github.com/robotology/cer-sim.git &&\ + # git clone https://github.com/robotology/navigation.git &&\ git clone https://github.com/icub-tech-iit/appsAway.git &&\ - git clone https://github.com/robotology/icub-models.git --depth 1 --branch devel &&\ + # git clone https://github.com/robotology/icub-models.git --depth 1 --branch devel &&\ chmod -R g+rw ${PROJECTS_DIR} - # Build robotology-superbuild +# Build robotology-superbuild RUN cd ${PROJECTS_DIR}/robotology-superbuild &&\ git checkout ${release} &&\ # Add no-install-recommends to robotology libraries @@ -88,7 +86,7 @@ RUN cd ${PROJECTS_DIR}/robotology-superbuild &&\ # Remove build directory rm -rf /projects/robotology-superbuild/build/src - # Build checkRobotInterface +# Build checkRobotInterface RUN cd ${PROJECTS_DIR}/appsAway/modules/checkRobotInterface && \ mkdir build && cd build && \ cmake .. \ @@ -100,44 +98,44 @@ RUN cd ${PROJECTS_DIR}/appsAway/modules/checkRobotInterface && \ # Remove build directory rm -rf ${PROJECTS_DIR}/appsAway/modules/checkRobotInterface/build - # Build icub-models -RUN cd ${PROJECTS_DIR}/icub-models && mkdir build && cd build && \ - cmake .. \ - -DCMAKE_BUILD_TYPE=${SOURCES_BUILD_TYPE} && \ - make install && \ - # Remove build directory - rm -rf ${PROJECTS_DIR}/icub-models/build - - # Build CER -RUN cd ${PROJECTS_DIR}/cer && \ - git checkout devel &&\ - mkdir build && cd build &&\ - cmake .. \ - -G "$CMAKE_GENERATOR" \ - -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - -D ENABLE_cermod_cerDoubleLidar=ON \ - -DENABLE_faceExpressionImage=ON \ - -DGAZEBO_TRIPOD_PLUGIN=ON && \ - cmake --build . -- ${CMAKE_EXTRA_OPTIONS} - # Remove build directory - # rm -rf ${PROJECTS_DIR}/cer/build +# # Build icub-models +# RUN cd ${PROJECTS_DIR}/icub-models && mkdir build && cd build && \ +# cmake .. \ +# -DCMAKE_BUILD_TYPE=${SOURCES_BUILD_TYPE} && \ +# make install && \ +# # Remove build directory +# rm -rf ${PROJECTS_DIR}/icub-models/build + +# # Build CER +# RUN cd ${PROJECTS_DIR}/cer && \ +# git checkout devel &&\ +# mkdir build && cd build &&\ +# cmake .. \ +# -G "$CMAKE_GENERATOR" \ +# -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ +# -D ENABLE_cermod_cerDoubleLidar=ON \ +# -DENABLE_faceExpressionImage=ON \ +# -DGAZEBO_TRIPOD_PLUGIN=ON && \ +# cmake --build . -- ${CMAKE_EXTRA_OPTIONS} +# # Remove build directory +# # rm -rf ${PROJECTS_DIR}/cer/build - # Build Navigation -RUN cd ${PROJECTS_DIR}/navigation && \ - mkdir build && cd build &&\ - cmake .. \ - -G "$CMAKE_GENERATOR" \ - &&\ - cmake --build . -- ${CMAKE_EXTRA_OPTIONS} &&\ - make install && \ - rm -rf ${PROJECTS_DIR}/navigation/build - - # Using Multi-Stage Builds - # We use a middle stage because several COPY commands with hardlinks and softlinks generate duplication +# # Build Navigation +# RUN cd ${PROJECTS_DIR}/navigation && \ +# mkdir build && cd build &&\ +# cmake .. \ +# -G "$CMAKE_GENERATOR" \ +# &&\ +# cmake --build . -- ${CMAKE_EXTRA_OPTIONS} &&\ +# make install && \ +# rm -rf ${PROJECTS_DIR}/navigation/build + +# Using Multi-Stage Builds +# We use a middle stage because several COPY commands with hardlinks and softlinks generate duplication FROM $START_IMG as middlestage - # Variables defined before the first FROM can be accessed in all stages but they need to be re-declared +# Variables defined before the first FROM can be accessed in all stages but they need to be re-declared ARG PROJECTS_DIR ARG ROBOTOLOGY_INITIALIZATION_FILE ARG INSTALL_DIR @@ -163,13 +161,12 @@ RUN echo "source ${INSTALL_DIR}/share/robotology-superbuild/setup.sh" >> $ROBOTO FROM scratch - # Variables defined before the first FROM can be accessed in all stages but they need to be re-declared +# Variables defined before the first FROM can be accessed in all stages but they need to be re-declared ARG PROJECTS_DIR ARG INSTALL_DIR -ARG GAZEBO_VER +ARG ROBOTOLOGY_INITIALIZATION_FILE ARG release ARG sbtag -ARG ROBOTOLOGY_INITIALIZATION_FILE ARG metadata COPY --from=middlestage / / @@ -181,7 +178,7 @@ ENV GAZEBO_MODEL_PATH=/usr/local/share/gazebo/models:/usr/local/share/iCub/robot ENV GAZEBO_MODEL_DATABASE_URI=http://gazebosim.org/models ENV GAZEBO_RESOURCE_PATH=/usr/local/share/gazebo/worlds ENV GAZEBO_MASTER_URI=http://localhost:11345 -ENV YARP_DATA_DIRS=${PROJECTS_DIR}/cer/build/share/CER:${PROJECTS_DIR}/cer/build/share/CER/robots/CER01:/usr/local/share/navigation +# ENV YARP_DATA_DIRS=${PROJECTS_DIR}/cer/build/share/CER:${PROJECTS_DIR}/cer/build/share/CER/robots/CER01:/usr/local/share/navigation ENV QT_X11_NO_MITSHM=1 ENV YARP_COLORED_OUTPUT=1 ENV img_metadata=${metadata} @@ -190,6 +187,4 @@ EXPOSE 10000/tcp 10000/udp ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] -CMD ["bash"] - - +CMD ["bash"] \ No newline at end of file diff --git a/dockerfile_images/basic/superbuild-gazebo/Dockerfile4Production b/dockerfile_images/basic/superbuild-gazebo/Dockerfile4Production index 4389265..057314e 100644 --- a/dockerfile_images/basic/superbuild-gazebo/Dockerfile4Production +++ b/dockerfile_images/basic/superbuild-gazebo/Dockerfile4Production @@ -25,4 +25,4 @@ ENV YARP_ROBOT_NAME="iCubGazeboV2_5" ENV QT_X11_NO_MITSHM=1 ENV YARP_COLORED_OUTPUT=1 -CMD ["bash"] +CMD ["bash"] \ No newline at end of file diff --git a/dockerfile_images/basic/superbuild-gazebo/conf_build.ini b/dockerfile_images/basic/superbuild-gazebo/conf_build.ini index fd1d47c..73fb8ad 100644 --- a/dockerfile_images/basic/superbuild-gazebo/conf_build.ini +++ b/dockerfile_images/basic/superbuild-gazebo/conf_build.ini @@ -1,15 +1,15 @@ [sources] -START_IMG=ubuntu:focal -$(cat DATE_TAG) +START_IMG=ubuntu:jammy +metadata={{steps.get_date.outputs.DATE_HOUR}} release={{steps.get_version.outputs.VERSION}} sbtag={{matrix.tag}} [binaries] SOURCE_IMG={{env.DEFAULT_USER}}/{{matrix.apps}}:{{steps.get_version.outputs.VERSION}}{{steps.get_version.outputs.TAG}}_sources -START_IMG=ubuntu:focal +START_IMG=ubuntu:jammy [tag] {{matrix.apps}}:{{steps.get_version.outputs.VERSION}}{{steps.get_version.outputs.TAG}} -[superbuild] +[superbuild] \ No newline at end of file diff --git a/dockerfile_images/basic/superbuild-icubhead-withuser/Dockerfile b/dockerfile_images/basic/superbuild-icubhead-withuser/Dockerfile index 30dc349..9705c1a 100644 --- a/dockerfile_images/basic/superbuild-icubhead-withuser/Dockerfile +++ b/dockerfile_images/basic/superbuild-icubhead-withuser/Dockerfile @@ -1,7 +1,14 @@ #start from image passed by argument during build process. Usually it is an ubuntu image plus mesa library. ARG START_IMG="none" +ARG INSTALL_DIR=/home/icub/install_dir +ARG PROJECTS_DIR=/home/icub/projects +ARG METADATA_FILE=/home/icub/install_dir/bin/setup_metadata.sh +ARG ROBOTOLOGY_INITIALIZATION_FILE=/usr/local/bin/setup_robotology_tdd.sh +ARG release="none" +ARG sbtag="none" +ARG metadata="none" -FROM $START_IMG +FROM $START_IMG AS builder LABEL maintainer="valentina.gaggero@iit.it, jacopo.losi@iit.it" @@ -33,20 +40,22 @@ RUN sudo mkdir /etc/bash_completion.d/ &&\ vim \ apt-utils +# Re-declarations +ARG METADATA_FILE +ARG INSTALL_DIR +ARG PROJECTS_DIR +ARG ROBOTOLOGY_INITIALIZATION_FILE +ARG release +ARG sbtag +ARG metadata #Some definitions ARG CMAKE_GENERATOR="Unix Makefiles" ARG BUILD_TYPE=Release ARG CMAKE_EXTRA_OPTIONS=-j2 -ARG INSTALL_DIR=/home/icub/install_dir -ARG release="master" -ARG sbtag="Stable" -ARG METADATA_FILE=/home/icub/install_dir/bin/setup_metadata.sh # Setup entrypoint -ARG ROBOTOLOGY_INITIALIZATION_FILE=/usr/local/bin/setup_robotology_tdd.sh - COPY entrypoint.sh /usr/local/bin/entrypoint.sh COPY setup.sh ${ROBOTOLOGY_INITIALIZATION_FILE} RUN sudo chown -R icub: /usr/local/bin/entrypoint.sh @@ -54,9 +63,6 @@ RUN sudo chown -R icub: /usr/local/bin/setup_robotology_tdd.sh ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] - -ARG PROJECTS_DIR=/home/icub/projects - #ENV DEBIAN_FRONTEND=noninteractive is not sufficient RUN echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-selections &&\ mkdir ${PROJECTS_DIR} && cd ${PROJECTS_DIR} &&\ @@ -83,26 +89,24 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | sudo debconf-set-sel cmake --build . -- ${CMAKE_EXTRA_OPTIONS} - RUN echo "source ${INSTALL_DIR}/share/robotology-superbuild/setup.sh" >> $ROBOTOLOGY_INITIALIZATION_FILE - RUN echo "source ${METADATA_FILE}" >> $ROBOTOLOGY_INITIALIZATION_FILE + RUN echo "source ${INSTALL_DIR}/share/robotology-superbuild/setup.sh" >> $ROBOTOLOGY_INITIALIZATION_FILE &&\ + echo "source ${METADATA_FILE}" >> $ROBOTOLOGY_INITIALIZATION_FILE -# # The bashrc is read only when opening an interactive shell. Let other projects find packages contained -# # in the superbuild. - ENV CMAKE_PREFIX_PATH=${INSTALL_DIR} +# Stage 2: secondstage stage +FROM $START_IMG AS secondstage -#add checkRobotInterface -RUN cd ${PROJECTS_DIR} &&\ - git clone https://github.com/icub-tech-iit/appsAway.git && \ - cd appsAway/modules/checkRobotInterface && \ - mkdir build && cd build && \ - cmake .. \ - -G "$CMAKE_GENERATOR" \ - -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - &&\ - cmake --build . -- ${CMAKE_EXTRA_OPTIONS} && \ - cp ./checkRobotInterface /home/icub/install_dir/bin +ARG METADATA_FILE +ARG PROJECTS_DIR +ARG release +ARG sbtag +ARG metadata +ARG INSTALL_DIR=/usr/local +COPY --from=builder / / +# # The bashrc is read only when opening an interactive shell. Let other projects find packages contained +# # in the superbuild. + ENV CMAKE_PREFIX_PATH=${INSTALL_DIR} #The EXPOSE instruction does not actually publish the port. #It functions as a type of documentation between the person who builds the image and the person who runs the container, about which ports are intended to be published. @@ -114,13 +118,11 @@ ENV QT_X11_NO_MITSHM 1 ENV YARP_COLORED_OUTPUT 1 - -ARG metadata="none" - ENV img_metadata=${metadata} -RUN echo "File metadata = ${METADATA_FILE}" -RUN echo 'export img_metadata=${metadata}' >> $METADATA_FILE -RUN echo 'echo 'This images has release=$release and had been building with superbuild_tag=$sbtag. Metadata=$metadata ' ' >> $METADATA_FILE + +RUN echo "File metadata = ${METADATA_FILE}" &&\ + echo 'export img_metadata=${metadata}' >> $METADATA_FILE &&\ + echo 'echo 'This images has release=$release and had been building with superbuild_tag=$sbtag. Metadata=$metadata ' ' >> $METADATA_FILE CMD ["bash"] diff --git a/dockerfile_images/basic/superbuild-icubhead-withuser/conf_build.ini b/dockerfile_images/basic/superbuild-icubhead-withuser/conf_build.ini index c613967..9b6a535 100644 --- a/dockerfile_images/basic/superbuild-icubhead-withuser/conf_build.ini +++ b/dockerfile_images/basic/superbuild-icubhead-withuser/conf_build.ini @@ -1,6 +1,6 @@ [sources] START_IMG=ubuntu:jammy -$(cat DATE_TAG) +metadata={{steps.get_date.outputs.DATE_HOUR}} release={{steps.get_version.outputs.VERSION}} sbtag={{matrix.tag}} diff --git a/dockerfile_images/basic/superbuild-icubhead/Dockerfile b/dockerfile_images/basic/superbuild-icubhead/Dockerfile index 6ee527e..8cb218f 100644 --- a/dockerfile_images/basic/superbuild-icubhead/Dockerfile +++ b/dockerfile_images/basic/superbuild-icubhead/Dockerfile @@ -1,12 +1,32 @@ #start from image passed by argument during build process. Usually it is an ubuntu image plus mesa library. ARG START_IMG="none" +ARG ROBOTOLOGY_INITIALIZATION_FILE=/usr/local/bin/setup_robotology_tdd.sh ARG METADATA_FILE=/usr/local/bin/setup_metadata.sh -FROM $START_IMG +ARG INSTALL_DIR=/usr/local +ARG PROJECTS_DIR=/projects +ARG release="none" +ARG sbtag="none" +ARG metadata="none" + +FROM $START_IMG AS builder LABEL maintainer="valentina.gaggero@iit.it, jacopo.losi@iit.it" ENV DEBIAN_FRONTEND=noninteractive +ARG METADATA_FILE +ARG ROBOTOLOGY_INITIALIZATION_FILE +ARG PROJECTS_DIR +ARG INSTALL_DIR +ARG release +ARG sbtag +ARG metadata + +# Some stage specific definitions +ARG CMAKE_GENERATOR="Unix Makefiles" +ARG BUILD_TYPE=Release +ARG CMAKE_EXTRA_OPTIONS=-j4 + # Install dependencies given in documentation in superbuild # https://github.com/robotology/robotology-superbuild#linux RUN mkdir /etc/bash_completion.d/ &&\ @@ -17,23 +37,9 @@ RUN mkdir /etc/bash_completion.d/ &&\ git -#Some definitions -ARG PROJECTS_DIR=/projects -ARG CMAKE_GENERATOR="Unix Makefiles" -ARG BUILD_TYPE=Release -ARG CMAKE_EXTRA_OPTIONS=-j2 -ARG INSTALL_DIR="/usr/local" -ARG release="master" -ARG sbtag="Stable" -ARG METADATA_FILE - - # Setup entrypoint -ARG ROBOTOLOGY_INITIALIZATION_FILE=/usr/local/bin/setup_robotology_tdd.sh COPY entrypoint.sh /usr/local/bin/entrypoint.sh COPY setup.sh ${ROBOTOLOGY_INITIALIZATION_FILE} -ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] - RUN mkdir ${PROJECTS_DIR} && cd ${PROJECTS_DIR} &&\ git clone https://github.com/robotology/robotology-superbuild.git &&\ @@ -58,28 +64,28 @@ RUN mkdir ${PROJECTS_DIR} && cd ${PROJECTS_DIR} &&\ cmake --build . --target update-all -- -j4 &&\ cmake --build . -- ${CMAKE_EXTRA_OPTIONS} +# Executing commands in chain makes compilation faster +# other then calling the command RUN everytime +RUN echo "source ${INSTALL_DIR}/share/robotology-superbuild/setup.sh" >> $ROBOTOLOGY_INITIALIZATION_FILE &&\ + echo "source ${METADATA_FILE}" >> $ROBOTOLOGY_INITIALIZATION_FILE +# Stage 2: secondstage stage +FROM $START_IMG AS secondstage -RUN echo "source ${INSTALL_DIR}/share/robotology-superbuild/setup.sh" >> $ROBOTOLOGY_INITIALIZATION_FILE -RUN echo "source ${METADATA_FILE}" >> $ROBOTOLOGY_INITIALIZATION_FILE +ARG PROJECTS_DIR +ARG INSTALL_DIR + +COPY --from=builder ${PROJECTS_DIR} ${PROJECTS_DIR} +COPY --from=builder /usr /usr +COPY --from=builder /etc /etc # The bashrc is read only when opening an interactive shell. Let other projects find packages contained # in the superbuild. ENV CMAKE_PREFIX_PATH=${INSTALL_DIR} -#add checkRobotInterface -RUN cd ${PROJECTS_DIR} &&\ - git clone https://github.com/icub-tech-iit/appsAway.git && \ - cd appsAway/modules/checkRobotInterface && \ - mkdir build && cd build && \ - cmake .. \ - -G "$CMAKE_GENERATOR" \ - -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - &&\ - cmake --build . -- ${CMAKE_EXTRA_OPTIONS} && \ - cp ./checkRobotInterface /usr/local/bin - - +# This should theoretically help reducing the size of the final image +FROM scratch +COPY --from=secondstage / / #The EXPOSE instruction does not actually publish the port. #It functions as a type of documentation between the person who builds the image and the person who runs the container, about which ports are intended to be published. @@ -90,15 +96,17 @@ EXPOSE 10000/tcp 10000/udp ENV QT_X11_NO_MITSHM 1 ENV YARP_COLORED_OUTPUT 1 - - -ARG metadata="none" +ARG METADATA_FILE +ARG release +ARG sbtag +ARG metadata ENV img_metadata=${metadata} -RUN echo 'export img_metadata=${metadata}' > $METADATA_FILE -RUN echo 'echo 'This images has release=$release and had been building with superbuild_tag=$sbtag. Metadata=$metadata ' ' >> $METADATA_FILE +RUN echo 'export img_metadata=${metadata}' > $METADATA_FILE &&\ + echo 'echo 'This images has release=$release and had been building with superbuild_tag=$sbtag. Metadata=$metadata ' ' >> $METADATA_FILE +ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] CMD ["bash"] diff --git a/dockerfile_images/basic/superbuild-icubhead/conf_build.ini b/dockerfile_images/basic/superbuild-icubhead/conf_build.ini index 80e5698..aafd7df 100644 --- a/dockerfile_images/basic/superbuild-icubhead/conf_build.ini +++ b/dockerfile_images/basic/superbuild-icubhead/conf_build.ini @@ -1,6 +1,6 @@ [sources] START_IMG=ubuntu:jammy -$(cat DATE_TAG) +metadata={{steps.get_date.outputs.DATE_HOUR}} release={{steps.get_version.outputs.VERSION}} sbtag={{matrix.tag}} diff --git a/dockerfile_images/basic/superbuild-icubtest/Dockerfile b/dockerfile_images/basic/superbuild-icubtest/Dockerfile index 108042e..e2476ef 100644 --- a/dockerfile_images/basic/superbuild-icubtest/Dockerfile +++ b/dockerfile_images/basic/superbuild-icubtest/Dockerfile @@ -1,26 +1,28 @@ #here add all stuff necessary to run icub-tests #start from image passed by argument during build process. Usually it is icubteamcode/superbuild:master-unstable_source ARG SOURCE_IMG="none" -ARG INSTALL_DIR="/usr/local" -#ARG PROJECTS_DIR=/projects -ARG release="master" -ARG sbtag="Stable" -ARG METADATA_FILE="/usr/local/bin/setup_metadata.sh" +ARG METADATA_FILE=/usr/local/bin/setup_metadata.sh +ARG INSTALL_DIR=/usr/local +ARG PROJECTS_DIR=/projects +ARG release="none" +ARG sbtag="none" +ARG metadata="none" +# Stage 1: build stage FROM $SOURCE_IMG as builder LABEL maintainer="valentina.gaggero@iit.it, jacopo.losi@iit.it" +ARG METADATA_FILE +ARG INSTALL_DIR +ARG PROJECTS_DIR +ARG release +ARG sbtag +ARG metadata - -ARG PROJECTS_DIR=/projects ARG CMAKE_GENERATOR="Unix Makefiles" ARG BUILD_TYPE=Release -ARG CMAKE_EXTRA_OPTIONS=-j2 -ARG INSTALL_DIR="/usr/local/" -ARG release -ARG sbtag -ARG METADATA_FILE +ARG CMAKE_EXTRA_OPTIONS=-j4 ENV DEBIAN_FRONTEND=noninteractive @@ -44,11 +46,12 @@ RUN cd ${PROJECTS_DIR}/robotology-superbuild &&\ cd build &&\ cmake .. \ -G "$CMAKE_GENERATOR" \ + -DBUILD_TESTING:BOOL=ON \ -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ -DNON_INTERACTIVE_BUILD:BOOL=ON \ -DROBOTOLOGY_ENABLE_CORE:BOOL=ON \ + -DROBOTOLOGY_ENABLE_ICUB_HEAD:BOOL=ON \ -DROBOTOLOGY_ENABLE_ROBOT_TESTING:BOOL=ON \ -# -DYCM_USE_DEPRECATED:BOOL=OFF \ because deprecated -DROBOTOLOGY_USES_GAZEBO=OFF \ -DROBOTOLOGY_PROJECT_TAGS=${sbtag} \ -DYCM_EP_INSTALL_DIR=${INSTALL_DIR} \ @@ -57,14 +60,20 @@ RUN cd ${PROJECTS_DIR}/robotology-superbuild &&\ cmake --build . --target update-all -- -j4 &&\ cmake --build . -- ${CMAKE_EXTRA_OPTIONS} -ARG metadata="none" +# Stage 2: scratch stage +# This should theoretically help reducing the size of the final image +FROM scratch +COPY --from=secondstage / / + +ARG metadata +ARG METADATA_FILE ENV img_metadata=${metadata} RUN echo 'export img_metadata=${metadata}' > $METADATA_FILE RUN echo 'echo 'This image was built on $metadata ' ' >> $METADATA_FILE -COPY entrypoint.sh /usr/local/bin/entrypoint.sh +# COPY entrypoint.sh /usr/local/bin/entrypoint.sh ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] diff --git a/dockerfile_images/basic/superbuild-icubtest/conf_build.ini b/dockerfile_images/basic/superbuild-icubtest/conf_build.ini index 95f0caf..0f21c6b 100644 --- a/dockerfile_images/basic/superbuild-icubtest/conf_build.ini +++ b/dockerfile_images/basic/superbuild-icubtest/conf_build.ini @@ -1,6 +1,6 @@ [sources] SOURCE_IMG={{env.REGISTRY}}/{{env.REPOSITORY_NAME}}/{{env.IMAGE_PREFIX}}superbuild:{{steps.get_version.outputs.VERSION}}{{steps.get_version.outputs.TAG}}_sources -$(cat DATE_TAG) +metadata={{steps.get_date.outputs.DATE_HOUR}} release={{steps.get_version.outputs.VERSION}} sbtag={{matrix.tag}} diff --git a/dockerfile_images/basic/superbuild-ros2/Dockerfile b/dockerfile_images/basic/superbuild-ros2/Dockerfile index eefb80d..8ceac69 100644 --- a/dockerfile_images/basic/superbuild-ros2/Dockerfile +++ b/dockerfile_images/basic/superbuild-ros2/Dockerfile @@ -10,7 +10,6 @@ ARG ROS_IMG=ros:humble-ros-base-jammy ARG ROS_DISTRO=humble # TODO Now it is working only with icub-main devel START_IMG IGNORED #ARG SUPERBUILD_IMG=icubteamcode/superbuild-icubhead:master-unstable_sources -# ARG SUPERBUILD_IMG=test-superbuild-icubhead:jammy ARG PROJECTS_DIR=/projects FROM $START_IMG as superbuild_builder @@ -20,6 +19,7 @@ ENV DEBIAN_FRONTEND=noninteractive LABEL maintainer="valentina.gaggero@iit.it, jacopo.losi@iit.it" +ARG ROS_DISTRO ARG PROJECTS_DIR COPY --from=superbuild_builder ${PROJECTS_DIR} ${PROJECTS_DIR} @@ -33,6 +33,14 @@ RUN apt update && apt install -y \ unzip RUN echo 'source /opt/ros/humble/setup.bash' >> /usr/local/bin/setup_robotology_tdd.sh + +FROM $ROS_IMG AS secondstage + +ARG ROS_DISTRO +ARG PROJECTS_DIR + +COPY --from=ros_builder / / + WORKDIR /root RUN wget https://github.com/icub-tech-iit/appsAway/files/8919271/FT_setup.zip RUN unzip FT_setup @@ -42,23 +50,23 @@ RUN wget https://github.com/icub-tech-iit/appsAway/files/9112222/FT_setup_can.zi RUN unzip FT_setup_can # TODO to be removed once it will merged on upstream branch -# RUN cd ${PROJECTS_DIR} && git clone https://github.com/robotology/yarp &&\ -# cd yarp &&\ -# git checkout master &&\ -# mkdir build && cd build &&\ -# cmake .. &&\ -# make install -j5 +RUN cd ${PROJECTS_DIR} && git clone https://github.com/robotology/yarp &&\ + cd yarp &&\ + git checkout master &&\ + mkdir build && cd build &&\ + cmake .. &&\ + make install -j5 # TODO to be removed once it will merged on upstream branch -# RUN cd ${PROJECTS_DIR} && git clone -b master https://github.com/robotology/icub-main &&\ -# cd icub-main &&\ -# mkdir build && cd build &&\ -# cmake .. \ -# -DENABLE_icubmod_canBusFtSensor:BOOL=OFF \ -# -DENABLE_icubmod_canBusAnalogSensor:BOOL=OFF \ -# -DENABLE_icubmod_embObjFTsensor:BOOL=ON \ -# &&\ -# make install -j5 +RUN cd ${PROJECTS_DIR} && git clone -b master https://github.com/robotology/icub-main &&\ + cd icub-main &&\ + mkdir build && cd build &&\ + cmake .. \ + -DENABLE_icubmod_canBusFtSensor:BOOL=ON \ + -DENABLE_icubmod_canBusAnalogSensor:BOOL=ON \ + -DENABLE_icubmod_embObjFTsensor:BOOL=ON \ + &&\ + make install -j5 RUN bash -c "source /opt/ros/$ROS_DISTRO/setup.bash &&\ @@ -72,7 +80,7 @@ RUN bash -c "source /opt/ros/$ROS_DISTRO/setup.bash &&\ cd .. &&\ mkdir build && cd build &&\ cmake .. &&\ - make install -j5" + make install -j4" ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] CMD ["bash"] diff --git a/dockerfile_images/basic/superbuild-ros2/conf_build.ini b/dockerfile_images/basic/superbuild-ros2/conf_build.ini index e265696..def17ee 100644 --- a/dockerfile_images/basic/superbuild-ros2/conf_build.ini +++ b/dockerfile_images/basic/superbuild-ros2/conf_build.ini @@ -1,6 +1,6 @@ [sources] START_IMG={{env.REGISTRY}}/{{env.REPOSITORY_NAME}}/{{env.IMAGE_PREFIX}}superbuild-icubhead:{{steps.get_version.outputs.VERSION}}{{steps.get_version.outputs.TAG}}_sources -$(cat DATE_TAG) +metadata={{steps.get_date.outputs.DATE_HOUR}} release={{steps.get_version.outputs.VERSION}} sbtag={{matrix.tag}} @@ -13,3 +13,6 @@ START_IMG={{env.REGISTRY}}/{{env.REPOSITORY_NAME}}/{{env.IMAGE_PREFIX}}superbuil [superbuild] +[children] +moveit-gazebo + diff --git a/dockerfile_images/basic/superbuild/Dockerfile b/dockerfile_images/basic/superbuild/Dockerfile index 857cfd4..46600cf 100644 --- a/dockerfile_images/basic/superbuild/Dockerfile +++ b/dockerfile_images/basic/superbuild/Dockerfile @@ -1,15 +1,28 @@ #start from image passed by argument during build process. Usually it is an ubuntu image plus mesa library. ARG START_IMG="none" -ARG INSTALL_DIR="/usr/local" -ARG METADATA_FILE="/usr/local/bin/setup_metadata.sh" +ARG ROBOTOLOGY_INITIALIZATION_FILE=/usr/local/bin/setup_robotology_tdd.sh +ARG METADATA_FILE=/usr/local/bin/setup_metadata.sh +ARG INSTALL_DIR=/usr/local ARG PROJECTS_DIR=/projects -ARG release="master" -ARG sbtag="Stable" +ARG release="none" +ARG sbtag="none" +ARG metadata="none" -FROM $START_IMG as builder +# Stage 1: builder stage +FROM $START_IMG AS builder LABEL maintainer="valentina.gaggero@iit.it, jacopo.losi@iit.it" +ARG METADATA_FILE +ARG INSTALL_DIR +ARG PROJECTS_DIR +ARG CMAKE_GENERATOR="Unix Makefiles" +ARG BUILD_TYPE=Release +ARG CMAKE_EXTRA_OPTIONS=-j4 +ARG release +ARG sbtag +ARG metadata + ENV DEBIAN_FRONTEND=noninteractive # Install dependencies given in documentation in superbuild @@ -26,21 +39,15 @@ RUN mkdir -p /etc/bash_completion.d/ && \ vim &&\ update-ca-certificates -#Some definitions -ARG INSTALL_DIR -ARG PROJECTS_DIR -ARG CMAKE_GENERATOR="Unix Makefiles" -ARG BUILD_TYPE=Release -ARG CMAKE_EXTRA_OPTIONS=-j2 -ARG release -ARG sbtag -#RUN if [ "$release" = "Stable" ]; then echo STABLE version is building; elif [ "$release" = "Ustable" ]; then echo UNSTABLE version is building && ${TAG}=Unstable; else echo SPECIFIC version $release is building && branch=$release; fi - +# Print debug info to check if relevant build args are taken correctly from conf_build.ini RUN echo "DEBUG ==> Release:" ${release} &&\ - echo "DEBUG ==> TAG: " ${tag} + echo "DEBUG ==> TAG:" ${sbtag} &&\ + echo "DEBUG ==> metadata:" ${metadata} &&\ + echo "DEBUG ==> METADATA_FILE:" ${METADATA_FILE} &&\ + echo "DEBUG ==> INSTALL_DIR:" ${INSTALL_DIR} # Setup entrypoint -ARG ROBOTOLOGY_INITIALIZATION_FILE=/usr/local/bin/setup_robotology_tdd.sh +ARG ROBOTOLOGY_INITIALIZATION_FILE COPY entrypoint.sh /usr/local/bin/entrypoint.sh COPY setup.sh ${ROBOTOLOGY_INITIALIZATION_FILE} @@ -64,48 +71,51 @@ RUN mkdir ${PROJECTS_DIR} && cd ${PROJECTS_DIR} &&\ -DYCM_EP_INSTALL_DIR=${INSTALL_DIR} \ &&\ # Build all the projects - cmake --build . -- ${CMAKE_EXTRA_OPTIONS} -j5 + cmake --build . -- ${CMAKE_EXTRA_OPTIONS} +# This steps should theoretically help cleaning unecessary post-build files that are already installed and that can be eventually re-generated RUN rm -rf ${PROJECTS_DIR}/robotology-superbuild/build/src &&\ echo "source ${INSTALL_DIR}/share/robotology-superbuild/setup.sh" >> $ROBOTOLOGY_INITIALIZATION_FILE -RUN cd ${PROJECTS_DIR} && \ - git clone https://github.com/icub-tech-iit/appsAway.git && \ - cd appsAway/modules/checkRobotInterface && \ - mkdir build && cd build && \ - cmake .. \ - -G "$CMAKE_GENERATOR" \ - -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ - &&\ - cmake --build . -- ${CMAKE_EXTRA_OPTIONS} && \ - cp ./checkRobotInterface /usr/local/bin - -# NEW STAGE ###### -FROM $START_IMG as secondstage +# Do we still need this repo from appsAway?? +# RUN cd ${PROJECTS_DIR} && \ +# git clone https://github.com/icub-tech-iit/appsAway.git && \ +# cd appsAway/modules/checkRobotInterface && \ +# mkdir build && cd build && \ +# cmake .. \ +# -G "$CMAKE_GENERATOR" \ +# -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ +# &&\ +# cmake --build . -- ${CMAKE_EXTRA_OPTIONS} && \ +# cp ./checkRobotInterface /usr/local/bin + +# Stage 2: secondstage stage +FROM $START_IMG AS secondstage # Setup entrypoint -ARG ROBOTOLOGY_INITIALIZATION_FILE=/usr/local/bin/setup_robotology_tdd.sh +ARG ROBOTOLOGY_INITIALIZATION_FILE ARG PROJECTS_DIR ARG METADATA_FILE ARG release ARG sbtag -ARG metadata="none" +ARG metadata COPY --from=builder ${PROJECTS_DIR} ${PROJECTS_DIR} COPY --from=builder /usr /usr COPY --from=builder /etc /etc RUN echo 'export img_metadata=${metadata}' > ${METADATA_FILE} &&\ - echo 'echo 'This images has release=$release and had been building with superbuild_tag=$sbtag. Metadata=$metadata ' ' >> ${METADATA_FILE} - -RUN echo "source ${METADATA_FILE}" >> ${ROBOTOLOGY_INITIALIZATION_FILE} + echo 'echo 'This images has release=$release and had been building with superbuild_tag=$sbtag. Metadata=$metadata' ' >> ${METADATA_FILE} &&\ + echo "source ${METADATA_FILE}" >> ${ROBOTOLOGY_INITIALIZATION_FILE} +# This should theoretically help reducing the size of the final image FROM scratch -COPY --from=secondstage / / +ARG metadata +COPY --from=secondstage / / #The EXPOSE instruction does not actually publish the port. #It functions as a type of documentation between the person who builds the image and the person who runs the container, about which ports are intended to be published. @@ -118,8 +128,6 @@ ENV YARP_COLORED_OUTPUT 1 ENV img_metadata=${metadata} - - ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] CMD ["bash"] diff --git a/dockerfile_images/basic/superbuild/Dockerfile4Production b/dockerfile_images/basic/superbuild/Dockerfile4Production index 0d9e85b..21a3605 100644 --- a/dockerfile_images/basic/superbuild/Dockerfile4Production +++ b/dockerfile_images/basic/superbuild/Dockerfile4Production @@ -4,7 +4,7 @@ ARG START_IMG="none" ARG SOURCE_IMG="none" FROM $SOURCE_IMG AS builder -FROM $START_IMG as secondstage +FROM $START_IMG AS secondstage LABEL maintainer="valentina.gaggero@iit.it, jacopo.losi@iit.it" diff --git a/dockerfile_images/basic/superbuild/conf_build.ini b/dockerfile_images/basic/superbuild/conf_build.ini index 8987064..6ad7b88 100644 --- a/dockerfile_images/basic/superbuild/conf_build.ini +++ b/dockerfile_images/basic/superbuild/conf_build.ini @@ -1,6 +1,6 @@ [sources] START_IMG=ubuntu:jammy -$(cat DATE_TAG) +metadata={{steps.get_date.outputs.DATE_HOUR}} release={{steps.get_version.outputs.VERSION}} sbtag={{matrix.tag}} @@ -15,4 +15,3 @@ START_IMG=ubuntu:jammy [children] superbuild-icubtest - diff --git a/dockerfile_images/demos/moveit-gazebo/Dockerfile b/dockerfile_images/demos/moveit-gazebo/Dockerfile new file mode 100644 index 0000000..53ee02d --- /dev/null +++ b/dockerfile_images/demos/moveit-gazebo/Dockerfile @@ -0,0 +1,71 @@ +#here add all stuff necessary to run redball demo in gazebo +#start from image passed by argument during build process. +ARG START_IMG="none" +ARG METADATA_FILE="/usr/local/bin/setup_metadata.sh" +ARG PROJECTS_DIR=/projects +ARG ROS2_WORKSPACE=ros2_ws + +FROM $START_IMG as builder + +ENV DEBIAN_FRONTEND=noninteractive + +LABEL maintainer="valentina.gaggero@iit.it, jacopo.losi@iit.it" + +# Args used as env variables always goes after FROM otherwise they are overridden +ARG PROJECTS_DIR +ARG ROS2_WORKSPACE + +ARG CMAKE_EXTRA_OPTIONS=-j4 + +#The EXPOSE instruction does not actually publish the port. +#It functions as a type of documentation between the person who builds the image and the person who runs the container, about which ports are intended to be published. +#To actually publish the port when running the container, use the -p flag on docker run to publish and map one or more ports, or the -P flag to publish all exposed ports and map them to high-order ports. +EXPOSE 10000/tcp 10000/udp + +# Some QT-Apps don't show controls without this +ENV QT_X11_NO_MITSHM 1 +ENV YARP_COLORED_OUTPUT=1 + +WORKDIR / + +# Install gazebo +RUN apt update && apt install -y \ + gazebo + +RUN apt update && apt install -y \ + ros-humble-gazebo-msgs \ + ros-humble-gazebo-ros \ + ros-humble-moveit \ + ros-humble-moveit-visual-tools \ + ros-humble-ros2-controllers \ + ros-humble-moveit-ros-planning-interface + +RUN echo 'export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp' >> /usr/local/bin/setup_robotology_tdd.sh + +# Install nlop (non-linear optimization needed for building trac_ik) +RUN bash -c "mkdir -p ${PROJECTS_DIR} && cd ${PROJECTS_DIR} &&\ + git clone https://github.com/stevengj/nlopt.git &&\ + cd nlopt &&\ + mkdir build &&\ + cd build &&\ + cmake .. &&\ + make &&\ + make install" + +RUN bash -c "mkdir -p ${PROJECTS_DIR}/${ROS2_WORKSPACE}/src && cd ${PROJECTS_DIR}/${ROS2_WORKSPACE}/src &&\ + source /opt/ros/humble/setup.bash &&\ + git clone https://bitbucket.org/traclabs/trac_ik.git -b rolling-devel &&\ + cd trac_ik &&\ + colcon build &&\ + source install/setup.bash" + +RUN bash -c "cd ${PROJECTS_DIR}/${ROS2_WORKSPACE}/src &&\ + source /opt/ros/humble/setup.bash &&\ + git clone https://github.com/icub-tech-iit/xcub-moveit2 &&\ + cd .. &&\ + colcon build &&\ + source install/setup.bash" + +ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] +CMD ["bash"] + diff --git a/dockerfile_images/demos/moveit-gazebo/conf_build.ini b/dockerfile_images/demos/moveit-gazebo/conf_build.ini new file mode 100644 index 0000000..cea2c20 --- /dev/null +++ b/dockerfile_images/demos/moveit-gazebo/conf_build.ini @@ -0,0 +1,9 @@ +[sources] +START_IMG={{env.REGISTRY}}/{{env.REPOSITORY_NAME}}/{{env.IMAGE_PREFIX}}superbuild-ros2:{{steps.get_version.outputs.VERSION}}{{steps.get_version.outputs.TAG}}_sources +metadata={{steps.get_date.outputs.DATE_HOUR}} +release={{steps.get_version.outputs.VERSION}} +sbtag={{matrix.tag}} + +[tag] +{{matrix.apps}}:{{steps.get_version.outputs.VERSION}}{{steps.get_version.outputs.TAG}} + diff --git a/deprecated_images/superbuild-ros1/entrypoint.sh b/dockerfile_images/demos/moveit-gazebo/entrypoint.sh similarity index 100% rename from deprecated_images/superbuild-ros1/entrypoint.sh rename to dockerfile_images/demos/moveit-gazebo/entrypoint.sh diff --git a/deprecated_images/blender/Dockerfile b/dockerfile_images/deprecated/blender/Dockerfile similarity index 100% rename from deprecated_images/blender/Dockerfile rename to dockerfile_images/deprecated/blender/Dockerfile diff --git a/deprecated_images/blender/Dockerfile4Production b/dockerfile_images/deprecated/blender/Dockerfile4Production similarity index 100% rename from deprecated_images/blender/Dockerfile4Production rename to dockerfile_images/deprecated/blender/Dockerfile4Production diff --git a/deprecated_images/blender/conf_build.ini b/dockerfile_images/deprecated/blender/conf_build.ini similarity index 100% rename from deprecated_images/blender/conf_build.ini rename to dockerfile_images/deprecated/blender/conf_build.ini diff --git a/deprecated_images/blender/entrypoint.sh b/dockerfile_images/deprecated/blender/entrypoint.sh similarity index 100% rename from deprecated_images/blender/entrypoint.sh rename to dockerfile_images/deprecated/blender/entrypoint.sh diff --git a/deprecated_images/blender/setup.sh b/dockerfile_images/deprecated/blender/setup.sh similarity index 100% rename from deprecated_images/blender/setup.sh rename to dockerfile_images/deprecated/blender/setup.sh diff --git a/deprecated_images/funny-things/Dockerfile b/dockerfile_images/deprecated/funny-things/Dockerfile similarity index 100% rename from deprecated_images/funny-things/Dockerfile rename to dockerfile_images/deprecated/funny-things/Dockerfile diff --git a/deprecated_images/funny-things/Dockerfile4Production b/dockerfile_images/deprecated/funny-things/Dockerfile4Production similarity index 100% rename from deprecated_images/funny-things/Dockerfile4Production rename to dockerfile_images/deprecated/funny-things/Dockerfile4Production diff --git a/deprecated_images/funny-things/conf_build.ini b/dockerfile_images/deprecated/funny-things/conf_build.ini similarity index 100% rename from deprecated_images/funny-things/conf_build.ini rename to dockerfile_images/deprecated/funny-things/conf_build.ini diff --git a/deprecated_images/gazebo/Dockerfile b/dockerfile_images/deprecated/gazebo/Dockerfile similarity index 100% rename from deprecated_images/gazebo/Dockerfile rename to dockerfile_images/deprecated/gazebo/Dockerfile diff --git a/deprecated_images/gazebo/Dockerfile4Production b/dockerfile_images/deprecated/gazebo/Dockerfile4Production similarity index 100% rename from deprecated_images/gazebo/Dockerfile4Production rename to dockerfile_images/deprecated/gazebo/Dockerfile4Production diff --git a/deprecated_images/gazebo/conf_build.ini b/dockerfile_images/deprecated/gazebo/conf_build.ini similarity index 100% rename from deprecated_images/gazebo/conf_build.ini rename to dockerfile_images/deprecated/gazebo/conf_build.ini diff --git a/deprecated_images/gazebo/entrypoint.sh b/dockerfile_images/deprecated/gazebo/entrypoint.sh similarity index 100% rename from deprecated_images/gazebo/entrypoint.sh rename to dockerfile_images/deprecated/gazebo/entrypoint.sh diff --git a/deprecated_images/gazebo/setup.sh b/dockerfile_images/deprecated/gazebo/setup.sh similarity index 100% rename from deprecated_images/gazebo/setup.sh rename to dockerfile_images/deprecated/gazebo/setup.sh diff --git a/deprecated_images/google-vision/Dockerfile b/dockerfile_images/deprecated/google-vision/Dockerfile similarity index 100% rename from deprecated_images/google-vision/Dockerfile rename to dockerfile_images/deprecated/google-vision/Dockerfile diff --git a/deprecated_images/google-vision/Dockerfile4Production b/dockerfile_images/deprecated/google-vision/Dockerfile4Production similarity index 100% rename from deprecated_images/google-vision/Dockerfile4Production rename to dockerfile_images/deprecated/google-vision/Dockerfile4Production diff --git a/deprecated_images/google-vision/conf_build.ini b/dockerfile_images/deprecated/google-vision/conf_build.ini similarity index 100% rename from deprecated_images/google-vision/conf_build.ini rename to dockerfile_images/deprecated/google-vision/conf_build.ini diff --git a/deprecated_images/grasp-gazebo/Dockerfile b/dockerfile_images/deprecated/grasp-gazebo/Dockerfile similarity index 100% rename from deprecated_images/grasp-gazebo/Dockerfile rename to dockerfile_images/deprecated/grasp-gazebo/Dockerfile diff --git a/deprecated_images/grasp-gazebo/Dockerfile4Production b/dockerfile_images/deprecated/grasp-gazebo/Dockerfile4Production similarity index 100% rename from deprecated_images/grasp-gazebo/Dockerfile4Production rename to dockerfile_images/deprecated/grasp-gazebo/Dockerfile4Production diff --git a/deprecated_images/grasp-gazebo/conf_build.ini b/dockerfile_images/deprecated/grasp-gazebo/conf_build.ini similarity index 100% rename from deprecated_images/grasp-gazebo/conf_build.ini rename to dockerfile_images/deprecated/grasp-gazebo/conf_build.ini diff --git a/deprecated_images/grasp-gazebo/entrypoint.sh b/dockerfile_images/deprecated/grasp-gazebo/entrypoint.sh similarity index 100% rename from deprecated_images/grasp-gazebo/entrypoint.sh rename to dockerfile_images/deprecated/grasp-gazebo/entrypoint.sh diff --git a/deprecated_images/grasp-gazebo/setup.sh b/dockerfile_images/deprecated/grasp-gazebo/setup.sh similarity index 100% rename from deprecated_images/grasp-gazebo/setup.sh rename to dockerfile_images/deprecated/grasp-gazebo/setup.sh diff --git a/deprecated_images/grasp-the-ball-gazebo/Dockerfile b/dockerfile_images/deprecated/grasp-the-ball-gazebo/Dockerfile similarity index 100% rename from deprecated_images/grasp-the-ball-gazebo/Dockerfile rename to dockerfile_images/deprecated/grasp-the-ball-gazebo/Dockerfile diff --git a/deprecated_images/grasp-the-ball-gazebo/Dockerfile4Production b/dockerfile_images/deprecated/grasp-the-ball-gazebo/Dockerfile4Production similarity index 100% rename from deprecated_images/grasp-the-ball-gazebo/Dockerfile4Production rename to dockerfile_images/deprecated/grasp-the-ball-gazebo/Dockerfile4Production diff --git a/deprecated_images/grasp-the-ball-gazebo/conf_build.ini b/dockerfile_images/deprecated/grasp-the-ball-gazebo/conf_build.ini similarity index 100% rename from deprecated_images/grasp-the-ball-gazebo/conf_build.ini rename to dockerfile_images/deprecated/grasp-the-ball-gazebo/conf_build.ini diff --git a/deprecated_images/grasp-the-ball/Dockerfile b/dockerfile_images/deprecated/grasp-the-ball/Dockerfile similarity index 100% rename from deprecated_images/grasp-the-ball/Dockerfile rename to dockerfile_images/deprecated/grasp-the-ball/Dockerfile diff --git a/deprecated_images/grasp-the-ball/Dockerfile4Production b/dockerfile_images/deprecated/grasp-the-ball/Dockerfile4Production similarity index 100% rename from deprecated_images/grasp-the-ball/Dockerfile4Production rename to dockerfile_images/deprecated/grasp-the-ball/Dockerfile4Production diff --git a/deprecated_images/grasp-the-ball/conf_build.ini b/dockerfile_images/deprecated/grasp-the-ball/conf_build.ini similarity index 100% rename from deprecated_images/grasp-the-ball/conf_build.ini rename to dockerfile_images/deprecated/grasp-the-ball/conf_build.ini diff --git a/deprecated_images/gui-img/Dockerfile4Production b/dockerfile_images/deprecated/gui-img/Dockerfile4Production similarity index 100% rename from deprecated_images/gui-img/Dockerfile4Production rename to dockerfile_images/deprecated/gui-img/Dockerfile4Production diff --git a/deprecated_images/gui-img/conf_build.ini b/dockerfile_images/deprecated/gui-img/conf_build.ini similarity index 100% rename from deprecated_images/gui-img/conf_build.ini rename to dockerfile_images/deprecated/gui-img/conf_build.ini diff --git a/deprecated_images/human-sensing/Dockerfile b/dockerfile_images/deprecated/human-sensing/Dockerfile similarity index 100% rename from deprecated_images/human-sensing/Dockerfile rename to dockerfile_images/deprecated/human-sensing/Dockerfile diff --git a/deprecated_images/human-sensing/Dockerfile4Production b/dockerfile_images/deprecated/human-sensing/Dockerfile4Production similarity index 100% rename from deprecated_images/human-sensing/Dockerfile4Production rename to dockerfile_images/deprecated/human-sensing/Dockerfile4Production diff --git a/deprecated_images/human-sensing/conf_build.ini b/dockerfile_images/deprecated/human-sensing/conf_build.ini similarity index 100% rename from deprecated_images/human-sensing/conf_build.ini rename to dockerfile_images/deprecated/human-sensing/conf_build.ini diff --git a/deprecated_images/open-face/Dockerfile b/dockerfile_images/deprecated/open-face/Dockerfile similarity index 100% rename from deprecated_images/open-face/Dockerfile rename to dockerfile_images/deprecated/open-face/Dockerfile diff --git a/deprecated_images/open-face/Dockerfile4Production b/dockerfile_images/deprecated/open-face/Dockerfile4Production similarity index 100% rename from deprecated_images/open-face/Dockerfile4Production rename to dockerfile_images/deprecated/open-face/Dockerfile4Production diff --git a/deprecated_images/open-face/conf_build.ini b/dockerfile_images/deprecated/open-face/conf_build.ini similarity index 100% rename from deprecated_images/open-face/conf_build.ini rename to dockerfile_images/deprecated/open-face/conf_build.ini diff --git a/deprecated_images/speech/Dockerfile b/dockerfile_images/deprecated/speech/Dockerfile similarity index 100% rename from deprecated_images/speech/Dockerfile rename to dockerfile_images/deprecated/speech/Dockerfile diff --git a/deprecated_images/speech/Dockerfile4Production b/dockerfile_images/deprecated/speech/Dockerfile4Production similarity index 100% rename from deprecated_images/speech/Dockerfile4Production rename to dockerfile_images/deprecated/speech/Dockerfile4Production diff --git a/deprecated_images/speech/conf_build.ini b/dockerfile_images/deprecated/speech/conf_build.ini similarity index 100% rename from deprecated_images/speech/conf_build.ini rename to dockerfile_images/deprecated/speech/conf_build.ini diff --git a/deprecated_images/speech/startaudio.ini b/dockerfile_images/deprecated/speech/startaudio.ini similarity index 100% rename from deprecated_images/speech/startaudio.ini rename to dockerfile_images/deprecated/speech/startaudio.ini diff --git a/deprecated_images/superbuild-google/Dockerfile b/dockerfile_images/deprecated/superbuild-google/Dockerfile similarity index 100% rename from deprecated_images/superbuild-google/Dockerfile rename to dockerfile_images/deprecated/superbuild-google/Dockerfile diff --git a/deprecated_images/superbuild-google/Dockerfile4Production b/dockerfile_images/deprecated/superbuild-google/Dockerfile4Production similarity index 100% rename from deprecated_images/superbuild-google/Dockerfile4Production rename to dockerfile_images/deprecated/superbuild-google/Dockerfile4Production diff --git a/deprecated_images/superbuild-google/conf_build.ini b/dockerfile_images/deprecated/superbuild-google/conf_build.ini similarity index 100% rename from deprecated_images/superbuild-google/conf_build.ini rename to dockerfile_images/deprecated/superbuild-google/conf_build.ini diff --git a/deprecated_images/superbuild-google/entrypoint.sh b/dockerfile_images/deprecated/superbuild-google/entrypoint.sh similarity index 100% rename from deprecated_images/superbuild-google/entrypoint.sh rename to dockerfile_images/deprecated/superbuild-google/entrypoint.sh diff --git a/deprecated_images/superbuild-nvidia/Dockerfile b/dockerfile_images/deprecated/superbuild-nvidia/Dockerfile similarity index 100% rename from deprecated_images/superbuild-nvidia/Dockerfile rename to dockerfile_images/deprecated/superbuild-nvidia/Dockerfile diff --git a/deprecated_images/superbuild-nvidia/conf_build.ini b/dockerfile_images/deprecated/superbuild-nvidia/conf_build.ini similarity index 100% rename from deprecated_images/superbuild-nvidia/conf_build.ini rename to dockerfile_images/deprecated/superbuild-nvidia/conf_build.ini diff --git a/deprecated_images/superbuild-nvidia/entrypoint.sh b/dockerfile_images/deprecated/superbuild-nvidia/entrypoint.sh similarity index 100% rename from deprecated_images/superbuild-nvidia/entrypoint.sh rename to dockerfile_images/deprecated/superbuild-nvidia/entrypoint.sh diff --git a/deprecated_images/superbuild-nvidia/setup.sh b/dockerfile_images/deprecated/superbuild-nvidia/setup.sh similarity index 100% rename from deprecated_images/superbuild-nvidia/setup.sh rename to dockerfile_images/deprecated/superbuild-nvidia/setup.sh diff --git a/deprecated_images/superbuild-pytorch/Dockerfile b/dockerfile_images/deprecated/superbuild-pytorch/Dockerfile similarity index 100% rename from deprecated_images/superbuild-pytorch/Dockerfile rename to dockerfile_images/deprecated/superbuild-pytorch/Dockerfile diff --git a/deprecated_images/superbuild-pytorch/Dockerfile4Production b/dockerfile_images/deprecated/superbuild-pytorch/Dockerfile4Production similarity index 100% rename from deprecated_images/superbuild-pytorch/Dockerfile4Production rename to dockerfile_images/deprecated/superbuild-pytorch/Dockerfile4Production diff --git a/deprecated_images/superbuild-pytorch/conf_build.ini b/dockerfile_images/deprecated/superbuild-pytorch/conf_build.ini similarity index 100% rename from deprecated_images/superbuild-pytorch/conf_build.ini rename to dockerfile_images/deprecated/superbuild-pytorch/conf_build.ini diff --git a/deprecated_images/superbuild-pytorch/entrypoint.sh b/dockerfile_images/deprecated/superbuild-pytorch/entrypoint.sh similarity index 100% rename from deprecated_images/superbuild-pytorch/entrypoint.sh rename to dockerfile_images/deprecated/superbuild-pytorch/entrypoint.sh diff --git a/deprecated_images/superbuild-pytorch/setup.sh b/dockerfile_images/deprecated/superbuild-pytorch/setup.sh similarity index 100% rename from deprecated_images/superbuild-pytorch/setup.sh rename to dockerfile_images/deprecated/superbuild-pytorch/setup.sh diff --git a/deprecated_images/superbuild-ros1/Dockerfile b/dockerfile_images/deprecated/superbuild-ros1/Dockerfile similarity index 100% rename from deprecated_images/superbuild-ros1/Dockerfile rename to dockerfile_images/deprecated/superbuild-ros1/Dockerfile diff --git a/deprecated_images/superbuild-ros1/Dockerfile4Production b/dockerfile_images/deprecated/superbuild-ros1/Dockerfile4Production similarity index 100% rename from deprecated_images/superbuild-ros1/Dockerfile4Production rename to dockerfile_images/deprecated/superbuild-ros1/Dockerfile4Production diff --git a/deprecated_images/superbuild-ros1/conf_build.ini b/dockerfile_images/deprecated/superbuild-ros1/conf_build.ini similarity index 100% rename from deprecated_images/superbuild-ros1/conf_build.ini rename to dockerfile_images/deprecated/superbuild-ros1/conf_build.ini diff --git a/dockerfile_images/deprecated/superbuild-ros1/entrypoint.sh b/dockerfile_images/deprecated/superbuild-ros1/entrypoint.sh new file mode 100755 index 0000000..b12b0e4 --- /dev/null +++ b/dockerfile_images/deprecated/superbuild-ros1/entrypoint.sh @@ -0,0 +1,15 @@ +#!/bin/bash +set -e + +if [ -z "$(which setup_robotology_tdd.sh)" ] ; then + echo "File setup_robotology_tdd.sh not found." + exit 1 +fi + +source setup_robotology_tdd.sh + +echo "[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion" >> /root/.bashrc +echo "[ -r /usr/local/bin/setup_robotology_tdd.sh ] && . /usr/local/bin/setup_robotology_tdd.sh" >> /root/.bashrc + +# If a CMD is passed, execute it +exec "$@" diff --git a/deprecated_images/superbuild-ros1/setup.sh b/dockerfile_images/deprecated/superbuild-ros1/setup.sh similarity index 100% rename from deprecated_images/superbuild-ros1/setup.sh rename to dockerfile_images/deprecated/superbuild-ros1/setup.sh diff --git a/deprecated_images/superbuild-tensorflow-cpu/Dockerfile b/dockerfile_images/deprecated/superbuild-tensorflow-cpu/Dockerfile similarity index 100% rename from deprecated_images/superbuild-tensorflow-cpu/Dockerfile rename to dockerfile_images/deprecated/superbuild-tensorflow-cpu/Dockerfile diff --git a/deprecated_images/superbuild-tensorflow-cpu/Dockerfile4Production b/dockerfile_images/deprecated/superbuild-tensorflow-cpu/Dockerfile4Production similarity index 100% rename from deprecated_images/superbuild-tensorflow-cpu/Dockerfile4Production rename to dockerfile_images/deprecated/superbuild-tensorflow-cpu/Dockerfile4Production diff --git a/deprecated_images/superbuild-tensorflow-cpu/conf_build.ini b/dockerfile_images/deprecated/superbuild-tensorflow-cpu/conf_build.ini similarity index 100% rename from deprecated_images/superbuild-tensorflow-cpu/conf_build.ini rename to dockerfile_images/deprecated/superbuild-tensorflow-cpu/conf_build.ini diff --git a/deprecated_images/superbuild-tensorflow-cpu/entrypoint.sh b/dockerfile_images/deprecated/superbuild-tensorflow-cpu/entrypoint.sh similarity index 100% rename from deprecated_images/superbuild-tensorflow-cpu/entrypoint.sh rename to dockerfile_images/deprecated/superbuild-tensorflow-cpu/entrypoint.sh diff --git a/deprecated_images/superbuild-tensorflow-cpu/setup.sh b/dockerfile_images/deprecated/superbuild-tensorflow-cpu/setup.sh similarity index 100% rename from deprecated_images/superbuild-tensorflow-cpu/setup.sh rename to dockerfile_images/deprecated/superbuild-tensorflow-cpu/setup.sh diff --git a/deprecated_images/superbuild-tensorflow-gpu/Dockerfile b/dockerfile_images/deprecated/superbuild-tensorflow-gpu/Dockerfile similarity index 100% rename from deprecated_images/superbuild-tensorflow-gpu/Dockerfile rename to dockerfile_images/deprecated/superbuild-tensorflow-gpu/Dockerfile diff --git a/deprecated_images/superbuild-tensorflow-gpu/Dockerfile4Production b/dockerfile_images/deprecated/superbuild-tensorflow-gpu/Dockerfile4Production similarity index 100% rename from deprecated_images/superbuild-tensorflow-gpu/Dockerfile4Production rename to dockerfile_images/deprecated/superbuild-tensorflow-gpu/Dockerfile4Production diff --git a/deprecated_images/superbuild-tensorflow-gpu/conf_build.ini b/dockerfile_images/deprecated/superbuild-tensorflow-gpu/conf_build.ini similarity index 100% rename from deprecated_images/superbuild-tensorflow-gpu/conf_build.ini rename to dockerfile_images/deprecated/superbuild-tensorflow-gpu/conf_build.ini diff --git a/deprecated_images/superbuild-tensorflow-gpu/entrypoint.sh b/dockerfile_images/deprecated/superbuild-tensorflow-gpu/entrypoint.sh similarity index 100% rename from deprecated_images/superbuild-tensorflow-gpu/entrypoint.sh rename to dockerfile_images/deprecated/superbuild-tensorflow-gpu/entrypoint.sh diff --git a/deprecated_images/superbuild-tensorflow-gpu/setup.sh b/dockerfile_images/deprecated/superbuild-tensorflow-gpu/setup.sh similarity index 100% rename from deprecated_images/superbuild-tensorflow-gpu/setup.sh rename to dockerfile_images/deprecated/superbuild-tensorflow-gpu/setup.sh diff --git a/deprecated_images/supervise-calib/Dockerfile b/dockerfile_images/deprecated/supervise-calib/Dockerfile similarity index 100% rename from deprecated_images/supervise-calib/Dockerfile rename to dockerfile_images/deprecated/supervise-calib/Dockerfile diff --git a/deprecated_images/supervise-calib/Dockerfile4Production b/dockerfile_images/deprecated/supervise-calib/Dockerfile4Production similarity index 100% rename from deprecated_images/supervise-calib/Dockerfile4Production rename to dockerfile_images/deprecated/supervise-calib/Dockerfile4Production diff --git a/deprecated_images/supervise-calib/conf_build.ini b/dockerfile_images/deprecated/supervise-calib/conf_build.ini similarity index 100% rename from deprecated_images/supervise-calib/conf_build.ini rename to dockerfile_images/deprecated/supervise-calib/conf_build.ini