diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cd834ec --- /dev/null +++ b/Dockerfile @@ -0,0 +1,46 @@ +# docker build -t untwine:latest . +# docker run -it -v "$PWD":/untwine untwine:latest --files=/untwine/test.las --output_dir=/untwine/test.ept.copc --single_file --stats + +FROM connormanning/entwine:dependencies +MAINTAINER Howard Butler + +RUN cd /opt/ && \ + wget https://ftp.gnu.org/gnu/time/time-1.9.tar.gz && \ + tar zxvf time-1.9.tar.gz && \ + cd time-1.9 && \ + ./configure && \ + make && \ + make install && \ + cp time /usr/bin/time + +RUN cd /opt && \ + git clone -b 3.0.0 https://github.com/verma/laz-perf.git && \ + cd /opt/laz-perf && \ + mkdir build && \ + cd build && \ + cmake .. && \ + make && \ + make install && \ + cd .. + +ENV LAZPERF_DIR /opt/laz-perf/build/cpp +ENV LD_LIBRARY_PATH /opt/laz-perf/build/cpp + +RUN cd /opt && \ + git clone -b main https://github.com/hobu/untwine.git && \ + cd /opt/untwine && \ + mkdir build && \ + cd build && \ + cmake .. && \ + make && \ + make install + +RUN chmod -R go+rX /opt/laz-perf /opt/untwine +RUN mkdir /untwine +RUN chmod -R go+rwX /untwine + +RUN useradd --create-home --no-log-init --shell /bin/bash untwine +USER untwine +RUN cd $HOME + +ENTRYPOINT ["/usr/bin/time", "-v", "untwine"] diff --git a/README.md b/README.md index b1772bc..73a6fd2 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,12 @@ cmake .. make ``` +Building a local docker image: +-------- +``` +docker build -t untwine:latest . +``` + Using Untwine ------------- @@ -37,6 +43,11 @@ Example: untwine --files=some_directory --output_dir=output_directory ``` +Or with your previously built local docker image: +``` +docker run -it -v "$PWD":/untwine untwine:latest --files=/untwine/test.laz --output_dir=/untwine/test.ept.copc --single_file --stats +``` + Options -------