Skip to content
Open
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
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
__pycache__/
*.py[cod]
*.pyo
*.pyd
*.swp
*.tmp
*.bak
.git
.gitignore
.DS_Store
22 changes: 8 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
FROM python:3.11-slim

RUN apt-get update && apt-get install -y --no-install-recommends \
libexpat1 \

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this?

&& rm -rf /var/lib/apt/lists/*
ENV PYTHONUNBUFFERED=1 \
THREEDTREES_METADATA_REFERENCE_DIR=/reference-data

RUN mkdir -p /in /out /src /reference-data && chmod 777 /in /out /src /reference-data

RUN pip install --no-cache-dir \
fiona \
pyproj \
shapely
WORKDIR /src

COPY requirements.txt ./
COPY src/ /src/
COPY reference-data/ /reference-data/
RUN chmod -R a+rX /src
RUN chmod -R a+rX /reference-data

ENV THREEDTREES_METADATA_REFERENCE_DIR=/reference-data
RUN pip install --no-cache-dir -r requirements.txt && \
chmod -R a+rX /src /reference-data

WORKDIR /src
CMD ["python", "run.py", "--help"]
ENTRYPOINT ["python", "run.py"]
CMD ["--help"]
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fiona==1.10.1
pyproj==3.7.2

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this might be a bit more reproducible

shapely==2.1.2