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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed

- Updated **stac-fastapi-pgstac** to v2.4.5 [#163](https://github.com/microsoft/planetary-computer-apis/pull/163)
- Updated tiler to use conda to manage dependencies, support LERC [#169](https://github.com/microsoft/planetary-computer-apis/pull/169)

## [2022.4.0]

Expand Down
14 changes: 8 additions & 6 deletions pctiler/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
FROM python:3.9-slim
FROM mambaorg/micromamba:1.4.0
COPY --chown=$MAMBA_USER:$MAMBA_USER pctiler/environment.yaml /tmp/env.yaml

# git required for pip installs from git
RUN apt update && apt install -y git
RUN micromamba install -y -n base -f /tmp/env.yaml && \
micromamba clean --all --yes

# The devops Personal Access Token for accessing
# Azure Artifacts. Note: This will be visible as
Expand All @@ -15,10 +16,11 @@ ARG DEVOPS_PAT
EXPOSE 8000

WORKDIR /opt/src
ARG MAMBA_DOCKERFILE_ACTIVATE=1

COPY pccommon /opt/src/pccommon
COPY pctiler /opt/src/pctiler
RUN pip install -e ./pccommon -e ./pctiler[server]
COPY --chown=$MAMBA_USER:$MAMBA_USER pccommon /opt/src/pccommon
COPY --chown=$MAMBA_USER:$MAMBA_USER pctiler /opt/src/pctiler
RUN python3 -m pip install -e ./pccommon -e ./pctiler[server]

# GDAL config
ENV GDAL_CACHEMAX 200
Expand Down
8 changes: 5 additions & 3 deletions pctiler/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM pc-apis-tiler

COPY requirements-dev.txt requirements-dev.txt
RUN pip install -r requirements-dev.txt
ARG MAMBA_DOCKERFILE_ACTIVATE=1

RUN pip install -e ./pccommon -e ./pctiler
COPY --chown=$MAMBA_USER:$MAMBA_USER requirements-dev.txt requirements-dev.txt

RUN python3 -m pip install -r requirements-dev.txt
RUN python3 -m pip install -e ./pccommon -e ./pctiler
Comment on lines +7 to +8
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a note that these lines are slightly risky, in that something in pip-land could decide to (re-)install that something that we expect to get from conda (like rasterio).

I manually verified that things were working as expected (that pip wasn't installing rasterio) but things might change in the future, and we wouldn't necessarily know until stuff breaks.

25 changes: 25 additions & 0 deletions pctiler/environment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: base
channels:
- conda-forge
dependencies:
- python=3.9.16
- pystac==1.7.1
- jinja2==3.0.3
- rasterio==1.3.6
- pyproj==3.4.1
- planetary-computer==0.4.9
- geojson-pydantic==0.4.2
# colormap dependencies
- matplotlib==3.4.3
- git
- pip
- pip:
- "titiler.core==0.10.2"
- "titiler.mosaic==0.10.2"

- # titiler-pgstac
- "psycopg[binary,pool]"
- "titiler.pgstac==0.2.2"

# - "importlib_resources>=1.1.0;python_version<'3.9'"
# - "pccommon"