Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix up docker configuration issues #3375
- Loading branch information
Showing
2 changed files
with
47 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,47 @@ | ||
FROM ubuntu:bionic | ||
FROM debian:buster-slim | ||
MAINTAINER Andrew Bell<andrew@hobu.co> | ||
|
||
SHELL ["/bin/bash", "-c"] | ||
ENV CC gcc-6 | ||
ENV CXX g++-6 | ||
|
||
RUN apt-get update --fix-missing && \ | ||
apt-get install -y \ | ||
wget unzip bzip2 gcc-6 g++-6 ca-certificates curl && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \ | ||
/bin/bash ~/miniconda.sh -b -p /opt/conda && \ | ||
rm ~/miniconda.sh && \ | ||
/opt/conda/bin/conda update -n base -c defaults conda && \ | ||
ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 | ||
|
||
RUN apt-get update -q && \ | ||
apt-get install -q -y \ | ||
bzip2 \ | ||
ca-certificates \ | ||
git \ | ||
libglib2.0-0 \ | ||
libsm6 \ | ||
libxext6 \ | ||
libxrender1 \ | ||
mercurial \ | ||
subversion \ | ||
wget \ | ||
&& apt-get clean | ||
|
||
ENV PATH /opt/conda/bin:$PATH | ||
|
||
CMD [ "/bin/bash" ] | ||
|
||
# Leave these args here to better use the Docker build cache | ||
ARG CONDA_VERSION=py38_4.9.2 | ||
ARG CONDA_MD5=122c8c9beb51e124ab32a0fa6426c656 | ||
|
||
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-${CONDA_VERSION}-Linux-x86_64.sh -O miniconda.sh && \ | ||
echo "${CONDA_MD5} miniconda.sh" > miniconda.md5 && \ | ||
if ! md5sum --status -c miniconda.md5; then exit 1; fi && \ | ||
mkdir -p /opt && \ | ||
sh miniconda.sh -b -p /opt/conda && \ | ||
rm miniconda.sh miniconda.md5 && \ | ||
ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \ | ||
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.profile && \ | ||
echo "conda activate base" >> ~/.profile | ||
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \ | ||
echo "conda activate base" >> ~/.bashrc && \ | ||
find /opt/conda/ -follow -type f -name '*.a' -delete && \ | ||
find /opt/conda/ -follow -type f -name '*.js.map' -delete && \ | ||
/opt/conda/bin/conda clean -afy | ||
|
||
RUN . /opt/conda/etc/profile.d/conda.sh && \ | ||
conda create --yes --quiet --name pdal && \ | ||
conda activate pdal && \ | ||
conda install --yes --name pdal -c conda-forge git cmake ninja \ | ||
conda-forge-ci-setup && \ | ||
conda install --yes --name pdal -c conda-forge pdal --only-deps | ||
|
||
RUN . /opt/conda/etc/profile.d/conda.sh && \ | ||
conda activate pdal && \ | ||
conda install --yes --name pdal -c conda-forge eigen | ||
|
||
# | ||
# We install fgt and cpd in /usr. By default they'll go in /usr/local. | ||
# When in /usr/local, we'd have to run ldconfig in order for them to be found | ||
# at run-time. This is an issue for the CPD filter and test. We could also | ||
# put them in the conda directory and set the rpath when building the | ||
# test. Probably better is just to stick this stuff in vendor and build | ||
# as a static lib(s). | ||
# | ||
RUN . /opt/conda/etc/profile.d/conda.sh && \ | ||
conda activate pdal && \ | ||
git clone https://github.com/PDAL/fgt.git && \ | ||
mkdir -p fgt/build && \ | ||
cd fgt/build && \ | ||
cmake \ | ||
-DCMAKE_INSTALL_PREFIX=/usr \ | ||
-G Ninja .. && \ | ||
ninja install && \ | ||
cd / && \ | ||
rm -rf fgt | ||
|
||
RUN . /opt/conda/etc/profile.d/conda.sh && \ | ||
conda activate pdal && \ | ||
git clone https://github.com/PDAL/cpd.git && \ | ||
mkdir -p cpd/build && \ | ||
cd cpd/build && \ | ||
cmake \ | ||
-DCMAKE_INSTALL_PREFIX=/usr \ | ||
-DWITH_FGT=ON \ | ||
-G Ninja .. && \ | ||
ninja install && \ | ||
cd / && \ | ||
rm -rf cpd | ||
RUN conda create -n pdal -y && conda install -c conda-forge compilers git cmake ninja && \ | ||
conda install --yes --name pdal -c conda-forge pdal --only-deps | ||
|
||
RUN \ | ||
mkdir gridzip && \ | ||
cd gridzip && \ | ||
curl -LOs http://download.osgeo.org/proj/proj-datumgrid-1.8.zip && unzip -j -u -o proj-datumgrid-1.8.zip -d /usr/share/proj && rm proj-datumgrid-1.8.zip ; \ | ||
curl -LOs http://download.osgeo.org/proj/proj-datumgrid-europe-1.2.zip && unzip -j -u -o proj-datumgrid-europe-1.2.zip -d /usr/share/proj && rm proj-datumgrid-europe-1.2.zip ; \ | ||
curl -LOs http://download.osgeo.org/proj/proj-datumgrid-oceania-1.0.zip && unzip -j -u -o proj-datumgrid-oceania-1.0.zip -d /usr/share/proj && rm proj-datumgrid-oceania-1.0.zip; \ | ||
curl -LOs http://download.osgeo.org/proj/proj-datumgrid-world-1.0.zip && unzip -j -u -o proj-datumgrid-world-1.0.zip -d /usr/share/proj && rm proj-datumgrid-world-1.0.zip; \ | ||
curl -LOs http://download.osgeo.org/proj/proj-datumgrid-north-america-1.2.zip && unzip -j -u -o proj-datumgrid-north-america-1.2.zip -d /usr/share/proj && rm proj-datumgrid-north-america-1.2.zip | ||
|