Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install system
run: |
apt-get update -qqy
apt-get install -y git python3-pip libpq5 libpq-dev
apt-get install -y git python3-pip libpq5 libpq-dev r-base libtirpc-dev
- uses: actions/checkout@v4
with:
submodules: 'true'
Expand Down
7 changes: 7 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ FROM ghcr.io/osgeo/gdal:ubuntu-small-3.10.0
RUN apt-get update -qqy && \
apt-get install -qy \
git \
cmake \
python3-pip \
r-base \
libpq-dev \
libtirpc-dev \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/cache/apt/*

Expand All @@ -29,6 +32,10 @@ RUN pip install gdal[numpy]==3.10.0
COPY requirements.txt /tmp/
RUN pip install -r /tmp/requirements.txt

RUN mkdir /root/R
ENV R_LIBS_USER=/root/R
RUN Rscript -e 'install.packages(c("lme4","lmerTest","emmeans"), repos="https://cloud.r-project.org")'

COPY ./ /root/star
WORKDIR /root/star
RUN chmod 755 ./scripts/run.sh
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ geopandas
postgis
psycopg2
psutil
pymer4
pyproj
scikit-image
requests
Expand Down
2 changes: 1 addition & 1 deletion scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ echo "Generating threat task list..."
python3 ./utils/threats_generator.py --input ${DATADIR}/species-info --datadir ${DATADIR} --output ${DATADIR}/threatbatch.csv

echo "Generating threat rasters..."
littlejohn -j ${THREADS} -o ${DATADIR}/threatbatch.log -c ${DATADIR}/threatcatch.csv ${VIRTUAL_ENV}/bin/python3 -- ./threats/threat_processing.py
littlejohn -j ${THREADS} -o ${DATADIR}/threatbatch.log -c ${DATADIR}/threatbatch.csv ${VIRTUAL_ENV}/bin/python3 -- ./threats/threat_processing.py

echo "Summarising threats..."
python3 ./threats/threat_summation.py --threat_rasters ${DATADIR}/threat_rasters --output ${DATADIR}/threat_results