-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #27 from AgPipeline/develop
Merge develop to main branch
- Loading branch information
Showing
75 changed files
with
3,987 additions
and
187 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 |
---|---|---|
|
@@ -81,6 +81,9 @@ target/ | |
profile_default/ | ||
ipython_config.py | ||
|
||
# LAS files | ||
.las | ||
|
||
# pyenv | ||
.python-version | ||
|
||
|
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,95 @@ | ||
FROM ubuntu:20.04 | ||
LABEL maintainer="Chris Schnaufer <[email protected]>" | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
# Add user | ||
RUN useradd -u 49044 extractor \ | ||
&& mkdir /home/extractor | ||
RUN chown -R extractor /home/extractor \ | ||
&& chgrp -R extractor /home/extractor | ||
|
||
# Install the Python version we want | ||
RUN apt-get update && \ | ||
apt-get upgrade -y && \ | ||
apt-get install -y --no-install-recommends \ | ||
python3.8 \ | ||
python3-pip \ | ||
pdal && \ | ||
ln -sfn /usr/bin/python3.8 /usr/bin/python && \ | ||
ln -sfn /usr/bin/python3.8 /usr/bin/python3 && \ | ||
ln -sfn /usr/bin/python3.8m /usr/bin/python3m && \ | ||
apt-get autoremove -y && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# Perform some upgrades | ||
RUN python3 -m pip install --upgrade --no-cache-dir pip | ||
RUN python3 -m pip install --upgrade --no-cache-dir setuptools | ||
|
||
# Install applications we need | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
python3-gdal \ | ||
gdal-bin \ | ||
libgdal-dev \ | ||
gcc \ | ||
g++ \ | ||
python3.8-dev && \ | ||
python3 -m pip install --upgrade --no-cache-dir \ | ||
wheel && \ | ||
python3 -m pip install --upgrade --no-cache-dir \ | ||
numpy && \ | ||
python3 -m pip install --upgrade --no-cache-dir \ | ||
pygdal==3.0.4.* && \ | ||
python3 -m pip install --upgrade --no-cache-dir \ | ||
pylint && \ | ||
python3 -m pip install --upgrade --no-cache-dir \ | ||
pdal==2.3.6 && \ | ||
apt-get remove -y \ | ||
libgdal-dev \ | ||
gcc \ | ||
g++ \ | ||
python3-dev && \ | ||
apt-get autoremove -y && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
COPY requirements.txt packages.txt /home/extractor/ | ||
|
||
USER root | ||
|
||
RUN [ -s /home/extractor/packages.txt ] && \ | ||
(echo 'Installing packages' && \ | ||
apt-get update && \ | ||
cat /home/extractor/packages.txt | xargs apt-get install -y --no-install-recommends && \ | ||
rm /home/extractor/packages.txt && \ | ||
apt-get autoremove -y && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/*) || \ | ||
(echo 'No packages to install' && \ | ||
rm /home/extractor/packages.txt) | ||
|
||
RUN [ -s /home/extractor/requirements.txt ] && \ | ||
(echo "Install python modules" && \ | ||
python -m pip install -U --no-cache-dir pip && \ | ||
python -m pip install --no-cache-dir setuptools && \ | ||
python -m pip install --no-cache-dir -r /home/extractor/requirements.txt && \ | ||
rm /home/extractor/requirements.txt) || \ | ||
(echo "No python modules to install" && \ | ||
rm /home/extractor/requirements.txt) | ||
|
||
# Install the library | ||
COPY agpypeline /home/extractor/agpypeline/agpypeline | ||
COPY setup.py README.md /home/extractor/agpypeline/ | ||
COPY tests /home/extractor/agpypeline/tests | ||
COPY data /home/extractor/agpypeline/data | ||
COPY images /home/extractor/agpypeline/images | ||
COPY integration_tests /home/extractor/agpypeline/integration_tests | ||
|
||
RUN python3 -m pip install --upgrade /home/extractor/agpypeline | ||
|
||
USER root | ||
RUN chmod -R 777 /home/extractor/agpypeline | ||
|
||
USER extractor | ||
ENTRYPOINT ["/home/extractor/agpypeline/integration_tests/basic_algorithm.py"] |
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
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
"""CheckMD Class""" | ||
|
||
from typing import List, NamedTuple, Optional, TextIO | ||
|
||
|
||
# pylint: disable=invalid-name | ||
class CheckMD(NamedTuple): | ||
"""This is the CheckMD class based off of NamedTuple which can be used in | ||
order to store data passed into argparse.""" | ||
timestamp: str | ||
season: str | ||
experiment: str | ||
working_folder: str | ||
list_files: List[TextIO] | ||
container_name: Optional[str] = None | ||
target_container_name: Optional[str] = None | ||
trigger_name: Optional[str] = None | ||
context_md: Optional[str] = None | ||
|
||
def get_list_files(self): | ||
"""Returns list_files""" | ||
return self.list_files |
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
Oops, something went wrong.