Run converter in docker

Hello

I am trying to run the converter in docker (Bitbucket). I have build the image (Using the authoring/converter/bin files taken from the web sdk (downloaded in manage account). But when i try to run the converter command I get the following error:
Failed to load the Exchange SDK

Am i missing some files ?
Can someone point me into the right direction into what I am doing wrong?

Thank you !


Full command and output:

docker run --mount “type=bind,source=/home/stijn/Hoops/communicator-docker/models/to_convert,target=/opt/ts3d/cadfiles” --mount “type=bind,source=/home/stijn/Hoops/communicator-docker/models/converted,target=/opt/ts3d/output” techsoft3d/communicator-converter --input /opt/ts3d/cadfiles/100039907.obj --output_sc /opt/ts3d/output/100039907 --sc_create_scz 1 --sc_compress_scz 1 --output_png “/opt/ts3d/output/100039907.png” --background_color 0.75,0.86,0.97 --output_png_resolution 320x240 --load_all_configurations 1 --sc_export_attributes 1 --license ‘detacted’

[10/16/2020 11-52-09-000 D:0 PID:29 M:136MB]INFO 0: Command Line = /opt/ts3d/bin/linux64/converter --input /opt/ts3d/cadfiles/100039907.obj --output_sc /opt/ts3d/output/100039907 --sc_create_scz 1 --sc_compress_scz 1 --output_png /opt/ts3d/output/100039907.png --background_color 0.75,0.86,0.97 --output_png_resolution 320x240 --load_all_configurations 1 --sc_export_attributes 1 --license detacted

[10/16/2020 11-52-09-000 D:0 PID:29 M:136MB]INFO: HOOPS Converter v8.0 - SC v68 Build e0da558

            [10/16/2020 11-52-09-000 D:0 PID:29 M:136MB]INFO: Component initialization

                            [10/16/2020 11-52-09-000 D:0 PID:29 M:136MB]INFO: Initializing HPS::World

                            [10/16/2020 11-52-10-000 D:0 PID:29 M:256MB]INFO: Initializing Exchange

[10/16/2020 11-52-11-000 D:0 PID:29 M:791MB]ERROR 1: Failed to load the Exchange SDK

[10/16/2020 11-52-11-000 D:0 PID:29 M:767MB]ERROR 1: Component initialization failure

            [10/16/2020 11-52-11-000 D:2000 PID:29 M:767MB]INFO: Exiting: Conversion failed
1 Like

Hello,
Converter is using dlopen to load libA3DLIBS.so found in the authoring/converter/bin/linux64 folder. Normally this is the same folder as the converter binary, so it’s found via normal search. There are a number of other .so and .tx files in the bin folder that Exchange requires.

Be sure your docker container image contains the entire contents of the converter/bin/linux64 folder. The error you’re showing indicates that the dlopen call failed.

Brad

1 Like

Thank you very much for your explaination. The error i had was that the libA3DLIBS.so was a symlink to the real shared library so docker could not access the file.

Everything works as expected now, thank you!

Hi Stijnv,

Thanks for sharing this update — that’s really helpful.

I’m currently facing what seems to be the same issue with HOOPS Exchange 2025.2.0 on Linux inside a Docker container. Even though libA3DLIBS.so is present in the expected directory, I still get the following error when trying to initialize the Exchange library:

2025-04-10 03:58:14.415 +00:00 [INF] Initializing HOOPS Exchange Library...
2025-04-10 03:58:14.424 +00:00 [FTL] HOOPS Exchange initialization failed: Unable to load Exchange.
/app/HOOPS_Exchange_Publish_2025.2.0_linux/bin/linux64/libA3DLIBS.so
Please check the path you specified.

I’ve double-checked that:

  • The file exists and is readable inside the container
  • Environment variables like LD_LIBRARY_PATH are correctly set
  • Required native Linux dependencies are installed

Based on your comment about symlinks — I suspect I might be running into the same problem, where Docker can’t resolve the symbolic link properly.

Could you please elaborate on how you resolved the symlink issue? Or did you change something in your Docker setup to handle it?

Thanks in advance! Your insight could really help me get this sorted.

Hello @nivedita.srivastava,

I just wanted to chime in on this forum thread…

Have you also tried including HOOPS_Exchange_Publish_2025.2.0/bin/libstdc++.so.6/linux64 as part of your Docker build?

Thanks,
Tino

Hi @tino,

Here’s the relevant part of my Dockerfile where I’m setting up HOOPS Exchange and Communicator:

dockerfile :

COPY --from=build /app/HOOPS_Exchange_Publish_2025.2.0_linux ./HOOPS_Exchange_Publish_2025.2.0_linux
COPY --from=build /app/HOOPS_Communicator_2025.2.0_linux ./HOOPS_Communicator_2025.2.0_linux

RUN chmod +x ./HOOPS_Communicator_2025.2.0_linux/authoring/converter/bin/linux64/converter

ENV ENV_FB_EXCHANGE_PATH=/app/HOOPS_Exchange_Publish_2025.2.0_linux/bin/linux64
ENV LD_LIBRARY_PATH=${ENV_FB_EXCHANGE_PATH}:${LD_LIBRARY_PATH}

Despite this setup, I’m still encountering the following error at runtime:

HOOPS Exchange initialization failed: Unable to load Exchange.

Would you be open to sharing your Dockerfile or the specific changes you made to get this working on your end? It would be super helpful to compare and understand what resolved it for you.

Thanks,
Nivedita

Hello @nivedita.srivastava,

Please see this forum post:

Thanks,
Tino

Subject: Issue Loading HOOPS Exchange SDK Libraries in Linux-Based Docker Container

Hi @tino,
I’m currently deploying a Converter and Exchange project using C# (.NET) in a Linux-based Docker container, utilizing the HOOPS Exchange C# Wrapper.

The converter.exe runs perfectly in the Linux container. However, the Exchange C# Wrapper fails when uploading CAD files due to shared library loading issues.

During debugging, I identified that the failure occurs in the following wrapper method, specifically at the call to dlopen(path, RTLD_LAZY | RTLD_GLOBAL):

static internal IntPtr LoadLibraryNoThrow(string path)
{
    IntPtr handle = IntPtr.Zero;
    if (IsWindows())
    {
        handle = LoadLibraryEx(path, IntPtr.Zero, LoadLibraryFlags.LOAD_WITH_ALTERED_SEARCH_PATH);
    }
    else
    {
        try
        {
            Console.WriteLine($"LoadLibraryNoThrow()");
            handle = dlopen(path, RTLD_LAZY | RTLD_GLOBAL);
            Console.WriteLine($"LoadLibraryNoThrow handle:{handle}");
        }
        catch (Exception ex)
        {
            Console.WriteLine($"LoadLibraryNoThrow() Error:{ex.Message}");
        }
    }
    return handle;
}

Here’s a sample error message:

LoadLibraryNoThrow() path: /home/azureuser/HOOPS_Exchange_Publish_2025.2.0/bin/linux64/liblibBuffer.so
LoadLibraryNoThrow()
LoadLibraryNoThrow() Error: Unable to load shared library 'dl' or one of its dependencies.
  /home/azureuser/publish-l5/dl.so: cannot open shared object file: No such file or directory
  /home/azureuser/publish-l5/libdl.so: cannot open shared object file: No such file or directory

This error appears for every .so file in the bin/linux64 directory.

Note: Everything works perfectly in a Windows-based Docker container.

Could you please advise how to resolve this for Linux? Any suggestions regarding missing dependencies or Docker configuration would be appreciated.

Thank you.

My quick suggestion is to ensure that LD_LIBRARY_PATH is correctly set before you run your application.