Open pablospe opened 9 months ago
I've removed the dependency on COLMAP - is the Docker size still an issue?
If I do docker images
after building it:
pyceres latest 7653326fc398 6 minutes ago 8.32GB
Which seems weird because it has a lot less dependencies.
I guess you don't need the cuda image anymore:
FROM nvidia/cuda:${NVIDIA_CUDA_VERSION}-devel-ubuntu${UBUNTU_VERSION} as builder
Just changing to regular ubuntu image base could reduce the size.
I would still recommend doing the builder/runtime split, since it is not really needed all the *-dev
libraries to run it.
I quickly updated this PR locally, using regular ubuntu image and I get:
pyceres runtime 93e79e43bd1a 55 seconds ago 425MB
pyceres builder 2574cc974212 58 seconds ago 1.41GB
edit: I added some runtime libraries
By dividing the Dockerfile into two stages, we significantly reduce the size of the final image. This is because the build dependencies, which are not required in the final image, are excluded.
You can create tags for each stage separately using the
--target
option:However, if you run the
docker build
command without the--target
option, it will build up to the last stage defined in the Dockerfile. So, running:is equivalent to specifying
--target runtime
, as runtime is the final stage in the Dockerfile.Reduction in size: