@@ -6,39 +6,37 @@ ARG PACKAGE_VERSION='latest'
66
77ENV 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}"
1211RUN mkdir -p ${JUPYTER_SETTINGS}
1312COPY user-settings/ ${JUPYTER_SETTINGS}/
14- COPY poetry.lock pyproject.toml ./
1513
1614# Install utilities for plot & animation rendering
1715RUN \
18- apt update \
19- && apt install -y imagemagick ffmpeg \
16+ apt-get update \
17+ && apt-get install -y imagemagick ffmpeg \
2018 && apt-get clean \
2119 && rm -rf /var/lib/apt/lists/*
2220
21+ # Use conda to install geospatial libraries (due to binary dependencies)
2322RUN \
24- # Use conda to install geospatial libraries (due to binary dependencies)
2523 conda config --set channel_priority strict \
2624 && 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
31- && 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 \
36- # Cleanup
37- && poetry cache clear -q --all . \
38- && python install-poetry.py --uninstall -y \
39- && rm poetry.lock pyproject.toml install-poetry.py \
25+ 'gdal==3.10' \
26+ 'geoviews==1.14' \
27+ 'geopandas==1.0' \
4028 && conda clean -yaf || echo 'Failed to clear Conda cache' \
41- && echo 'Fixing permissions' \
29+ && fix-permissions "${CONDA_DIR}"
30+
31+ # Install all other packages from lockfile via uv
32+ COPY uv.lock pyproject.toml ./
33+ RUN \
34+ fix-permissions "/home/${NB_USER}" \
35+ && curl -LsSf $UV_INSTALLER | sh \
36+ && uv add "pyinaturalist@${PACKAGE_VERSION}" \
37+ && uv sync \
38+ && uv cache clean \
39+ && rm uv.lock pyproject.toml \
4240 && fix-permissions "${CONDA_DIR}" \
4341 && fix-permissions "/home/${NB_USER}"
4442
0 commit comments