| 
									
										
										
										
											2025-07-31 20:21:06 +00:00
										 |  |  | FROM ubuntu:24.04 AS builder
 | 
					
						
							| 
									
										
										
										
											2017-04-10 17:02:19 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Env variables
 | 
					
						
							| 
									
										
										
										
											2020-11-02 18:35:32 +00:00
										 |  |  | ENV DEBIAN_FRONTEND=noninteractive \
 | 
					
						
							| 
									
										
										
										
											2025-08-09 20:40:41 +00:00
										 |  |  |     PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.12/dist-packages:/code/SuperBuild/install/bin/opensfm" \
 | 
					
						
							| 
									
										
										
										
											2020-11-02 18:35:32 +00:00
										 |  |  |     LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib"
 | 
					
						
							| 
									
										
										
										
											2017-04-10 17:02:19 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Prepare directories
 | 
					
						
							|  |  |  | WORKDIR /code
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-29 00:54:26 +00:00
										 |  |  | # Copy everything
 | 
					
						
							|  |  |  | COPY . ./
 | 
					
						
							| 
									
										
										
										
											2019-09-16 22:36:51 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-02 18:35:32 +00:00
										 |  |  | # Run the build
 | 
					
						
							| 
									
										
										
										
											2020-09-08 17:08:57 +00:00
										 |  |  | RUN bash configure.sh install
 | 
					
						
							| 
									
										
										
										
											2019-03-26 23:21:44 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-10 17:02:19 +00:00
										 |  |  | # Clean Superbuild
 | 
					
						
							| 
									
										
										
										
											2021-01-24 14:45:00 +00:00
										 |  |  | RUN bash configure.sh clean
 | 
					
						
							| 
									
										
										
										
											2020-11-02 18:35:32 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | ### END Builder
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ### Use a second image for the final asset to reduce the number and
 | 
					
						
							|  |  |  | # size of the layers.
 | 
					
						
							| 
									
										
										
										
											2025-08-01 17:37:43 +00:00
										 |  |  | FROM ubuntu:24.04
 | 
					
						
							| 
									
										
										
										
											2020-11-02 18:35:32 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | # Env variables
 | 
					
						
							|  |  |  | ENV DEBIAN_FRONTEND=noninteractive \
 | 
					
						
							| 
									
										
										
										
											2025-08-09 20:40:41 +00:00
										 |  |  |     PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.12/dist-packages:/code/SuperBuild/install/bin/opensfm" \
 | 
					
						
							| 
									
										
										
										
											2023-01-03 13:07:54 +00:00
										 |  |  |     LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib" \
 | 
					
						
							|  |  |  |     PDAL_DRIVER_PATH="/code/SuperBuild/install/bin"
 | 
					
						
							| 
									
										
										
										
											2020-11-02 18:35:32 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | WORKDIR /code
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Copy everything we built from the builder
 | 
					
						
							|  |  |  | COPY --from=builder /code /code
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-08-11 19:31:27 +00:00
										 |  |  | ENV PATH="/code/venv/bin:$PATH"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-11-02 18:35:32 +00:00
										 |  |  | # Install shared libraries that we depend on via APT, but *not*
 | 
					
						
							|  |  |  | # the -dev packages to save space!
 | 
					
						
							| 
									
										
										
										
											2022-01-12 17:17:31 +00:00
										 |  |  | # Also run a smoke test on ODM and OpenSfM
 | 
					
						
							| 
									
										
										
										
											2020-11-02 18:35:32 +00:00
										 |  |  | RUN bash configure.sh installruntimedepsonly \
 | 
					
						
							|  |  |  |   && apt-get clean \
 | 
					
						
							| 
									
										
										
										
											2021-11-17 18:08:57 +00:00
										 |  |  |   && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
 | 
					
						
							| 
									
										
										
										
											2022-01-12 19:16:37 +00:00
										 |  |  |   && bash run.sh --help \
 | 
					
						
							| 
									
										
										
										
											2022-01-12 17:17:31 +00:00
										 |  |  |   && bash -c "eval $(python3 /code/opendm/context.py) && python3 -c 'from opensfm import io, pymap'"
 | 
					
						
							| 
									
										
										
										
											2025-08-09 20:40:41 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-04-10 17:02:19 +00:00
										 |  |  | # Entry point
 | 
					
						
							| 
									
										
										
										
											2020-11-02 18:35:32 +00:00
										 |  |  | ENTRYPOINT ["python3", "/code/run.py"]
 |