notebooks
notebooks copied to clipboard
Docker image needs to be rebuilt to update dependencies for SDKv2
The hosted docker image at planetlabs/notebooks was last updated about 3 years ago, and appears to be on v1.4.6 of the Planet Python Client. With the release of SDKv2 and the updating of notebooks to use the v2 syntax, the image should likewise be rebuilt and updated so that it has SDKv2 installed.
Currently, when I attempt to run [jupyter-notebooks/orders_api_tutorials/ordering_and_delivery.ipynb][./jupyter-notebooks/orders_api_tutorials/ordering_and_delivery.ipynb] using the docker image, the first step fails with the error:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-6-3cd3200f6f3c> in <module>
6 import requests
7 import planet
----> 8 from planet import Session, DataClient, OrdersClient
ImportError: cannot import name 'Session' from 'planet' (/opt/conda/lib/python3.7/site-packages/planet/__init__.py)
As a warning for whomever ends up building the new image - it seems like the conda env in the docker image doesn't like SDKv2 (testing out a local build failed) so this one may be a bit more complicated than just rebuilding the image. Forcing planet==2.0.0
in the planet-notebook-docker/requirements.txt gave me this:
...
=> [2/7] COPY requirements.txt /tmp/requirements.txt 0.0s
=> [3/7] RUN apt-get update && apt-get install -yq --no-install-recommends libgl1-mesa-glx && apt-get clean && rm -rf /var/lib/apt/lists/* 13.4s
=> ERROR [4/7] RUN conda config --set channel_priority strict && conda install -y -c conda-forge --file /tmp/requirements.txt 1958.7s
------
> [4/7] RUN conda config --set channel_priority strict && conda install -y -c conda-forge --file /tmp/requirements.txt:
#8 1.462 Collecting package metadata (current_repodata.json): ...working... done
#8 23.84 Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
#8 136.6 Solving environment: ...working... failed with repodata from current_repodata.json, will retry with next repodata source.
#8 292.1 Collecting package metadata (repodata.json): ...working... done
#8 389.5 Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
#8 1331.0 Solving environment: ...working... Killed
------
executor failed running [/bin/sh -c conda config --set channel_priority strict && conda install -y -c conda-forge --file /tmp/requirements.txt]: exit code: 137
Good luck...