Skip to content

Instantly share code, notes, and snippets.

@wildintellect
Created January 7, 2022 00:32
Show Gist options
  • Save wildintellect/1ff3c8f4f91bdfce26460abc8c9db346 to your computer and use it in GitHub Desktop.
Save wildintellect/1ff3c8f4f91bdfce26460abc8c9db346 to your computer and use it in GitHub Desktop.
Untwine Docker Image VS Code
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/python-3-miniconda/.devcontainer/base.Dockerfile
FROM mcr.microsoft.com/vscode/devcontainers/miniconda:0-3
# [Choice] Node.js version: none, lts/*, 16, 14, 12, 10
ARG NODE_VERSION="none"
RUN if [ "${NODE_VERSION}" != "none" ]; then su vscode -c "umask 0002 && . /usr/local/share/nvm/nvm.sh && nvm install ${NODE_VERSION} 2>&1"; fi
# Copy environment.yml (if found) to a temp location so we update the environment. Also
# copy "noop.txt" so the COPY instruction does not fail if no environment.yml exists.
COPY environment.yml* .devcontainer/noop.txt /tmp/conda-tmp/
RUN if [ -f "/tmp/conda-tmp/environment.yml" ]; then umask 0002 && /opt/conda/bin/conda env update -n base -f /tmp/conda-tmp/environment.yml; fi \
&& rm -rf /tmp/conda-tmp
# [Optional] Uncomment to install a different version of Python than the default
# RUN conda install -y python=3.6 \
# && pip install --no-cache-dir pipx \
# && pipx reinstall-all
# [Optional] Uncomment this section to install additional OS packages.
#RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
# && apt-get -y install --no-install-recommends cmake
# Lazperf is installed from conda
#RUN git clone https://github.com/hobu/laz-perf.git \
# && cd laz-perf \
# && mkdir build \
# && cd build \
# && cmake .. \
# && make && make install \
# && cd ../..
# Install untwine
RUN git clone https://github.com/hobu/untwine.git
# && cd untwine \
# && mkdir build \
# && cd build \
# && cmake .. \
# && make && make install
ARG USERNAME=nonroot
ARG USER_UID=1001
ARG USER_GID=$USER_UID
# Create the user
RUN groupadd --gid ${USER_GID} ${USERNAME} \
&& useradd --uid ${USER_UID} --gid ${USER_GID} -m ${USERNAME}
$ make
[ 5%] Building CXX object CMakeFiles/untwine.dir/bu/BuPyramid.cpp.o
In file included from /workspaces/pdal/untwine/bu/PyramidManager.hpp:20,
from /workspaces/pdal/untwine/bu/BuPyramid.hpp:20,
from /workspaces/pdal/untwine/bu/BuPyramid.cpp:10:
/workspaces/pdal/untwine/bu/CopcSupport.hpp:56:14: error: 'header14' in namespace 'lazperf' does not name a type
56 | lazperf::header14 m_header;
| ^~~~~~~~
/workspaces/pdal/untwine/bu/CopcSupport.hpp:57:14: error: 'copc_info_vlr' in namespace 'lazperf' does not name a type
57 | lazperf::copc_info_vlr m_copcVlr;
| ^~~~~~~~~~~~~
/workspaces/pdal/untwine/bu/CopcSupport.hpp:60:14: error: 'wkt_vlr' in namespace 'lazperf' does not name a type
60 | lazperf::wkt_vlr m_wktVlr;
| ^~~~~~~
/workspaces/pdal/untwine/bu/CopcSupport.hpp:61:26: error: 'chunk' is not a member of 'lazperf'
61 | std::vector<lazperf::chunk> m_chunkTable;
| ^~~~~
/workspaces/pdal/untwine/bu/CopcSupport.hpp:61:26: error: 'chunk' is not a member of 'lazperf'
/workspaces/pdal/untwine/bu/CopcSupport.hpp:61:31: error: template argument 1 is invalid
61 | std::vector<lazperf::chunk> m_chunkTable;
| ^
/workspaces/pdal/untwine/bu/CopcSupport.hpp:61:31: error: template argument 2 is invalid
make[2]: *** [CMakeFiles/untwine.dir/build.make:76: CMakeFiles/untwine.dir/bu/BuPyramid.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/untwine.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment