Skip to content

Commit

Permalink
using micromamba instead of mamba
Browse files Browse the repository at this point in the history
  • Loading branch information
vlulla committed May 5, 2024
1 parent 074a0dc commit 00eff5d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions python_geospatial/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ USER ${PYUSR}

RUN <<EOT
set -ex
wget --quiet "https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-$(uname)-$(uname -m).sh"
bash "./Mambaforge-$(uname)-$(uname -m).sh" -b -p ~/mambaforge && rm -rf "~/Mambaforge-$(uname)-$(uname -m).sh"
~/mambaforge/bin/mamba init bash
~/mambaforge/bin/mamba install --name base --yes geopandas xarray rasterio dask distributed pyarrow pygeos polars
mkdir -p ${HOME}/{.local,micromamba} && pushd ${HOME}/.local
curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
${HOME}/.local/bin/micromamba shell init -s bash -p ${HOME}/micromamba
MAMBA_ROOT_PREFIX=${HOME}/micromamba ${HOME}/.local/bin/micromamba create --channel conda-forge --name geo --yes geopandas xarray rasterio dask distributed pyarrow pygeos polars
EOT

ENTRYPOINT ["tini","--"]
Expand Down
3 changes: 1 addition & 2 deletions python_geospatial/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ IMGTAG = python_geospatial
## bash $ diff <(NC=0 make -n) <(make -n)

all: Dockerfile
## > sed -e "s/^ARG UID=/&$$(id -u)/g;s/^ARG GID=/&$$(id -g)/g;s/^ARG PYUSR=/&$$(id -un)/g;s/^ARG PYGRP=/&$$(id -gn)/g" $< | docker buildx build --tag python_geospatial -f - .
> docker buildx build $(if $(NC),--no-cache,) --progress=plain -f $< --tag ${IMGTAG} --build-arg=GID=$$(id -g) --build-arg=UID=$$(id -u) --build-arg=PYUSR=$$(id -un) --build-arg=PYGRP=$$(id -gn) .
> docker buildx build $(if $(NC),--no-cache,) --platform=linux/amd64 --progress=plain -f $< --tag ${IMGTAG} --build-arg=PYUSR=$$(id -un) --build-arg=PYGRP=$$(id -gn) .

clean:
> docker rmi ${IMGTAG}
Expand Down

0 comments on commit 00eff5d

Please sign in to comment.