Closed pvelasco closed 12 months ago
If you have a tagged release, the version information should be read directly from Version.cmake
. You won't be able to do a superbuild, because that needs git to checkout ITK.
But the version information itself should not require git. It's possible that there's a bug, or maybe v2.4.2 didn't have all the necessary changes.
If you can upload the full details and build output, I'll take a look.
You might have already considered this, but could you build ANTs in a build layer and then copy the executables to a final install layer without git installed? This is how the ANTs Dockerfile works: the build layer has gcc, git, and all the development stuff, then the executables are copied to a smaller runtime layer without all that stuff.
Thanks for your response, @cookpa ,
Then, I run docker build -t deleteme/test .
Notice the line that says:
#4 5.542 Could NOT find Git (missing: GIT_EXECUTABLE)
In any case, I will follow your advice and build it in stages, as in the official Dockerfile
.
Why can't you use the ANTs docker image as your base image? Or download and use the binaries provided?
Thanks, I think this use case will not work because the Superbuild requires git to fetch ITK. To avoid git, it would be necessary to compile ITK separately. This is do-able but not trivial, and even then the ANTs cmake might need fixes to not require git.
Another option would be to copy binaries directly from the antsx/ants repository, with
COPY --from=antsx/ants:v2.4.2 /opt/ants /opt/ants
these binaries have shared libs on (so you'll want to set LD_LIBRARY_PATH), which reduces container size on disk.
The binaries on the Github releases page are built statically - unfortunately there isn't one for Ubuntu 18.04 for ANTs 2.4.2 becuase the native runner was deprecated, but I put it back for later versions using a docker build process.
When did the error occur? [X] CMake configuration (cmake / ccmake) [ ] Compilation (make) [ ] Installation (make install)
Build environment
ANTs version 2.4.2
Build configuration and logs
Additional context
Is it possible to remove the git dependency? I'm building a Docker image with ANTs and I'm trying to install as few dependencies as possible. It seems to me that there should be other ways of extracting the version info than using
git
...Thanks.