Torizoncore-builder is now complaining about /workdir/<normal path to image>

I am now under 24.04 using torizon7.2.0 with a tcbuild.yaml which worked under 20.04. when it gets to the lines:
input:
easy-installer:
local: images/torizon-docker-verdin-imx8mp-Tezi_7.2.0+build.13.tar
is says:
File “/builder/tcbuilder/backend/images.py”, line 366, in import_local_image"
raise TorizonCoreBuilderError(f"Image does not exist: {image_dir_or_file}")
tcbuilder.errors.TorizonCoreBuilderError: Image does not exist: /workdir/images/torizon-docker-verdin-imx8mp-Tezi_7.2.0+build.13.tar
Which of course it doesn’t because “workdir” should be set to “./”
Why has this changed? According to the documentation all paths need to be relative to the directory you are running torizoncore-builder.

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello! Thank you for your question.

The issue you’re encountering arises from how the TorizonCore Builder tool expects file paths to be structured and referenced.

When you run the torizoncore-builder command with a configuration file (tcbuild.yaml), the paths you specify in the configuration (such as for the Easy Installer image) should be relative to the directory where you execute the command. The TorizonCore Builder runs in a Docker container and internally uses /workdir as the working directory, which is mapped to your current directory on the host system.

How to resolve:

  1. Ensure the Directory Structure
    Inside your project directory (where you run the build command), you should have a subdirectory called images containing your image file. The structure should look like this:

    .
    ├── images
    │   └── torizon-docker-verdin-imx8mp-Tezi_7.2.0+build.13.tar
    └── tcbuild.yaml
    
  2. Verify Paths in tcbuild.yaml
    In your tcbuild.yaml, the path must be relative, such as:

    input:
      easy-installer:
        local: images/torizon-docker-verdin-imx8mp-Tezi_7.2.0+build.13.tar
    
  3. Run the Command in the Correct Directory
    Make sure you are in the root directory of your project (not in the images subdirectory) when you run the torizoncore-builder build command.

If the file isn’t found at /workdir/images/…, it means that from your current directory, there is no images/torizon-docker-verdin-imx8mp-Tezi_7.2.0+build.13.tar file. Double-check that the file exists at that location, and that you’re running the command from the expected parent directory.

More details can be found in these documentation pages:

Let me know if you need a more detailed explanation on path handling in TorizonCore Builder!

Best regards,
Toradex AI Assistant.

I had moved my directory to another name as to not conflict. My confusion was in the path it shows to the file that is not there, as it showed /workdir/… which is a valid path, but the real problem was the second directory, not the workdir, since that is NOT the path it looks at. That was where the confusion was/is. Sorry for the oversight.