GithubHelp home page GithubHelp logo

Comments (7)

hemalshahNV avatar hemalshahNV commented on June 12, 2024 2

Thanks for your patience, @paulsonnenschein, and your PRs (@harishkumarbalaji)! I finally got a chance to dig into this and verify your fix. The issue was recognizing whether a path was absolute or relative. The following is a distilled version of that check:

#!/bin/bash -x

if [[ "$1" != /* ]]; then
        echo "Relative path"
else
        echo "Absolute path"
fi

Removing the asterisks is not enough it turns out. We also need to remove the quotes around /* too.

The below is the patch going into the next Isaac ROS release with a slight modification of your changes @harishkumarbalaji

diff --git a/scripts/build_base_image.sh b/scripts/build_base_image.sh
index 52f0707..c619468 100755
--- a/scripts/build_base_image.sh
+++ b/scripts/build_base_image.sh
@@ -29,7 +29,9 @@ if [[ -f "${ROOT}/.isaac_ros_common-config" ]]; then
     # Prepend configured docker search dirs
     if [ ${#CONFIG_DOCKER_SEARCH_DIRS[@]} -gt 0 ]; then
         for (( i=${#CONFIG_DOCKER_SEARCH_DIRS[@]}-1 ; i>=0 ; i-- )); do
-            if [[ "${CONFIG_DOCKER_SEARCH_DIRS[i]}" != '/*'* ]]; then
+
+            # If the path is relative, then prefix ROOT to the path
+            if [[ "${CONFIG_DOCKER_SEARCH_DIRS[i]}" != /* ]]; then
                 CONFIG_DOCKER_SEARCH_DIRS[$i]="${ROOT}/${CONFIG_DOCKER_SEARCH_DIRS[i]}"
             fi
         done

from isaac_ros_common.

hemalshahNV avatar hemalshahNV commented on June 12, 2024 1

I think you're right @paulsonnenschein, it should be '/'*. Nice catch! I'll spin up a PR for you to review shortly after I run the change through some tests locally first.

With enabling BuildKit, we now rely on CONFIG_DOCKER_SEARCH_DIRS much more internally because symlinks are not longer allowed which prompted some of the reworking around the feature.

from isaac_ros_common.

harishkumarbalaji avatar harishkumarbalaji commented on June 12, 2024 1

I could see this bug still persists, Have raised a PR to fix this - #89

from isaac_ros_common.

ikhann avatar ikhann commented on June 12, 2024

Hi,
This update causes an error if one of the custom docker files is outside of "isaac_ros_common/scripts" folder.

I'm a bit confused, could you please explain why Dockerfiles have to be in a specific location? I see in the example provided in your README, the user Dockerfiles can be located anywhere.

As an example, I currently have a list of directories included in my Docker search list:

  1. /home/daniil/repos/squidrc-ros, my custom Dockerfile is here
  2. /home/daniil/repos/squidrc-ros/rc_ws/src/isaac_ros_common/scripts/../docker, Isaac ros Dockerfies are here.

So, when I run a building process, I get the wrong path by adding "/home/daniil/repos/squidrc-ros/rc_ws/src/isaac_ros_common/scripts/" to {1} path:

image

from isaac_ros_common.

paulsonnenschein avatar paulsonnenschein commented on June 12, 2024

I think you're right @paulsonnenschein, it should be '/'*. Nice catch! I'll spin up a PR for you to review shortly after I run the change through some tests locally first.

With enabling BuildKit, we now rely on CONFIG_DOCKER_SEARCH_DIRS much more internally because symlinks are not longer allowed which prompted some of the reworking around the feature.

Do you have an update on this @hemalshahNV ?

from isaac_ros_common.

hemalshahNV avatar hemalshahNV commented on June 12, 2024

This fix is in Isaac ROS 2.0.0 which is now available. Please check again and close as appropriate.

from isaac_ros_common.

paulsonnenschein avatar paulsonnenschein commented on June 12, 2024

I finally got around to upgrading to the 2.0 release.
I can confirm it works as expected now 👍

from isaac_ros_common.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.