Skip to content

Commit afe830d

Browse files
committed
WIP: Switch from poetry to uv
1 parent 79ff615 commit afe830d

File tree

5 files changed

+2602
-3529
lines changed

5 files changed

+2602
-3529
lines changed

Dockerfile

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,11 @@ ARG PACKAGE_VERSION='latest'
66

77
ENV JUPYTER_SETTINGS="/home/${NB_USER}/.jupyter/lab/user-settings" \
88
PATH="/home/${NB_USER}/.local/bin:${PATH}" \
9-
POETRY_INSTALLER="https://install.python-poetry.org/install-poetry.py" \
10-
POETRY_VIRTUALENVS_CREATE=false \
9+
UV_INSTALLER="https://astral.sh/uv/install.sh" \
1110
VIRTUAL_ENV="${CONDA_DIR}"
1211
RUN mkdir -p ${JUPYTER_SETTINGS}
1312
COPY user-settings/ ${JUPYTER_SETTINGS}/
14-
COPY poetry.lock pyproject.toml ./
13+
COPY uv.lock pyproject.toml ./
1514

1615
# Install utilities for plot & animation rendering
1716
RUN \
@@ -24,19 +23,17 @@ RUN \
2423
# Use conda to install geospatial libraries (due to binary dependencies)
2524
conda config --set channel_priority strict \
2625
&& conda install -yq -c conda-forge \
27-
'gdal==3.6.2' \
28-
'geoviews==1.9.6' \
29-
'geopandas==0.12.2' \
30-
# Use poetry to install all other packages from lockfile
26+
'gdal==3.10' \
27+
'geoviews==1.14' \
28+
'geopandas==1.0' \
29+
# Use uv to install all other packages from lockfile
3130
&& fix-permissions "/home/${NB_USER}" \
32-
&& wget $POETRY_INSTALLER \
33-
&& python install-poetry.py -y \
34-
&& poetry add "pyinaturalist@${PACKAGE_VERSION}" \
35-
&& poetry install -v \
31+
&& curl -LsSf $UV_INSTALLER | sh \
32+
&& uv add "pyinaturalist@${PACKAGE_VERSION}" \
33+
&& uv sync --frozen \
3634
# Cleanup
37-
&& poetry cache clear -q --all . \
38-
&& python install-poetry.py --uninstall -y \
39-
&& rm poetry.lock pyproject.toml install-poetry.py \
35+
&& uv cache clean \
36+
&& rm uv.lock pyproject.toml \
4037
&& conda clean -yaf || echo 'Failed to clear Conda cache' \
4138
&& echo 'Fixing permissions' \
4239
&& fix-permissions "${CONDA_DIR}" \

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
[![Docker Image Version](https://img.shields.io/docker/v/jxcook/pyinaturalist-notebook)](https://hub.docker.com/r/jxcook/pyinaturalist-notebook)
44
[![Run with Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/pyinat/pyinaturalist/main?filepath=examples)
55

6-
This is a simple extension of the Jupyter notebook server
6+
This is an extension of the Jupyter notebook server
77
([jupyter/scipy-notebook](https://jupyter-docker-stacks.readthedocs.io/en/latest/using/selecting.html#jupyter-scipy-notebook))
88
for working with [iNaturalist](https://www.inaturalist.org) data, which adds
9-
[pyinaturalist](https://github.com/pyinat/pyinaturalist) plus some extra packages for data exploration & visualization.
9+
[pyinaturalist](https://github.com/pyinat/pyinaturalist) and all dependencies needed for running
10+
[pyinaturalist example notebooks](https://pyinaturalist.readthedocs.io/en/stable/examples.html).
1011

1112
## Usage
1213
```bash

0 commit comments

Comments
 (0)