-
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.
- Loading branch information
Showing
1 changed file
with
42 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,44 @@ | ||
FROM python:3.8 | ||
FROM ubuntu:20.04 | ||
|
||
WORKDIR /extractor | ||
COPY requirements.txt ./ | ||
RUN pip install -r requirements.txt | ||
MAINTAINER Yong Wook Kim <[email protected]> | ||
|
||
COPY netcdfutils.py ncsa.geo.netcdf.extractor.py extractor_info.json ./ | ||
CMD python ncsa.geo.netcdf.extractor.py | ||
ARG VERSION="unknown" | ||
ARG BUILDNUMBER="unknown" | ||
ARG GITSHA1="unknown" | ||
|
||
RUN apt-get update &&\ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
python3 \ | ||
python-is-python3 \ | ||
python3-pip \ | ||
python3-gdal \ | ||
python3-numpy \ | ||
python3-rtree \ | ||
python-is-python3 \ | ||
python3-scipy && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
# copy requirements file | ||
COPY requirements.txt /home/clowder/ | ||
RUN pip3 install -r /home/clowder/requirements.txt | ||
RUN pip install --upgrade numpy | ||
|
||
# command to run when starting docker | ||
ENTRYPOINT ["/home/clowder/entrypoint.sh"] | ||
CMD ["extractor"] | ||
|
||
# Setup environment variables. These are passed into the container. You can change | ||
# these to your setup. If RABBITMQ_URI is not set, it will try and use the rabbitmq | ||
# server that is linked into the container. MAIN_SCRIPT is set to the script to be | ||
# executed by entrypoint.sh | ||
ENV VERSION=${VERSION} \ | ||
BUILDNUMBER=${BUILDNUMBER} \ | ||
GITSHA1=${GITSHA1} \ | ||
RABBITMQ_URI="" \ | ||
RABBITMQ_EXCHANGE="clowder" \ | ||
RABBITMQ_VHOST="%2F" \ | ||
RABBITMQ_QUEUE="ncsa.geotiff.metadata" \ | ||
MAIN_SCRIPT="ncsa.image.geotiff.py" | ||
|
||
# copy rest of the files needed | ||
COPY entrypoint.sh *.py extractor_info.json /home/clowder/ |