kopia lustrzana https://github.com/OpenDroneMap/ODM
update portable Dockerfile
rodzic
3cceddb4c6
commit
a445f05e4a
|
|
@ -2,7 +2,7 @@ FROM ubuntu:24.04 AS builder
|
||||||
|
|
||||||
# Env variables
|
# Env variables
|
||||||
ENV DEBIAN_FRONTEND=noninteractive \
|
ENV DEBIAN_FRONTEND=noninteractive \
|
||||||
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.12/dist-packages:/code/SuperBuild/install/lib/python3.12/dist-packages:/code/SuperBuild/install/bin/opensfm" \
|
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.12/dist-packages:/code/SuperBuild/install/bin/opensfm" \
|
||||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib"
|
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib"
|
||||||
|
|
||||||
# Prepare directories
|
# Prepare directories
|
||||||
|
|
@ -25,7 +25,7 @@ FROM ubuntu:24.04
|
||||||
|
|
||||||
# Env variables
|
# Env variables
|
||||||
ENV DEBIAN_FRONTEND=noninteractive \
|
ENV DEBIAN_FRONTEND=noninteractive \
|
||||||
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.12:/code/SuperBuild/install/lib/python3.12/dist-packages:/code/SuperBuild/install/bin/opensfm" \
|
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.12/dist-packages:/code/SuperBuild/install/bin/opensfm" \
|
||||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib" \
|
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib" \
|
||||||
PDAL_DRIVER_PATH="/code/SuperBuild/install/bin"
|
PDAL_DRIVER_PATH="/code/SuperBuild/install/bin"
|
||||||
|
|
||||||
|
|
@ -45,5 +45,6 @@ RUN bash configure.sh installruntimedepsonly \
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||||
&& bash run.sh --help \
|
&& bash run.sh --help \
|
||||||
&& bash -c "eval $(python3 /code/opendm/context.py) && python3 -c 'from opensfm import io, pymap'"
|
&& bash -c "eval $(python3 /code/opendm/context.py) && python3 -c 'from opensfm import io, pymap'"
|
||||||
|
|
||||||
# Entry point
|
# Entry point
|
||||||
ENTRYPOINT ["python3", "/code/run.py"]
|
ENTRYPOINT ["python3", "/code/run.py"]
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
FROM ubuntu:21.04 AS builder
|
FROM ubuntu:24.04 AS builder
|
||||||
|
|
||||||
# Env variables
|
# Env variables
|
||||||
ENV DEBIAN_FRONTEND=noninteractive \
|
ENV DEBIAN_FRONTEND=noninteractive \
|
||||||
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.9/dist-packages:/code/SuperBuild/install/lib/python3.8/dist-packages:/code/SuperBuild/install/bin/opensfm" \
|
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.12/dist-packages:/code/SuperBuild/install/bin/opensfm" \
|
||||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib"
|
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib"
|
||||||
|
|
||||||
# Prepare directories
|
# Prepare directories
|
||||||
|
|
@ -11,9 +11,6 @@ WORKDIR /code
|
||||||
# Copy everything
|
# Copy everything
|
||||||
COPY . ./
|
COPY . ./
|
||||||
|
|
||||||
# Use old-releases for 21.04
|
|
||||||
RUN printf "deb http://old-releases.ubuntu.com/ubuntu/ hirsute main restricted\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates main restricted\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute universe\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates universe\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute multiverse\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates multiverse\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-backports main restricted universe multiverse" > /etc/apt/sources.list
|
|
||||||
|
|
||||||
# Run the build
|
# Run the build
|
||||||
RUN PORTABLE_INSTALL=YES bash configure.sh install
|
RUN PORTABLE_INSTALL=YES bash configure.sh install
|
||||||
|
|
||||||
|
|
@ -24,11 +21,11 @@ RUN bash configure.sh clean
|
||||||
|
|
||||||
### Use a second image for the final asset to reduce the number and
|
### Use a second image for the final asset to reduce the number and
|
||||||
# size of the layers.
|
# size of the layers.
|
||||||
FROM ubuntu:21.04
|
FROM ubuntu:24.04
|
||||||
|
|
||||||
# Env variables
|
# Env variables
|
||||||
ENV DEBIAN_FRONTEND=noninteractive \
|
ENV DEBIAN_FRONTEND=noninteractive \
|
||||||
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.9/dist-packages:/code/SuperBuild/install/lib/python3.8/dist-packages:/code/SuperBuild/install/bin/opensfm" \
|
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.12/dist-packages:/code/SuperBuild/install/bin/opensfm" \
|
||||||
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib" \
|
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib" \
|
||||||
PDAL_DRIVER_PATH="/code/SuperBuild/install/bin"
|
PDAL_DRIVER_PATH="/code/SuperBuild/install/bin"
|
||||||
|
|
||||||
|
|
@ -40,11 +37,9 @@ COPY --from=builder /code /code
|
||||||
# Copy the Python libraries installed via pip from the builder
|
# Copy the Python libraries installed via pip from the builder
|
||||||
COPY --from=builder /usr/local /usr/local
|
COPY --from=builder /usr/local /usr/local
|
||||||
|
|
||||||
# Use old-releases for 21.04
|
|
||||||
RUN printf "deb http://old-releases.ubuntu.com/ubuntu/ hirsute main restricted\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates main restricted\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute universe\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates universe\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute multiverse\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-updates multiverse\ndeb http://old-releases.ubuntu.com/ubuntu/ hirsute-backports main restricted universe multiverse" > /etc/apt/sources.list
|
|
||||||
|
|
||||||
# Install shared libraries that we depend on via APT, but *not*
|
# Install shared libraries that we depend on via APT, but *not*
|
||||||
# the -dev packages to save space!
|
# the -dev packages to save space!
|
||||||
|
# Also run a smoke test on ODM and OpenSfM
|
||||||
RUN bash configure.sh installruntimedepsonly \
|
RUN bash configure.sh installruntimedepsonly \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||||
|
|
|
||||||
Ładowanie…
Reference in New Issue