diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9940ff26..4171d7d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -110,3 +110,5 @@ jobs: platforms: linux/amd64 tags: ${{ vars.DOCKERHUB_USERNAME }}/sopa:${{ env.VERSION }}${{ matrix.extra-name }} context: ./docker/sopa${{ matrix.extra-name }} + build-args: | + SOPA_VERSION=${{ env.VERSION }} diff --git a/docker/sopa-baysor/Dockerfile b/docker/sopa-baysor/Dockerfile index ed377969..2c9759ed 100644 --- a/docker/sopa-baysor/Dockerfile +++ b/docker/sopa-baysor/Dockerfile @@ -1,5 +1,7 @@ FROM python:3.10-slim +ARG SOPA_VERSION + RUN apt-get update && apt-get install -y wget unzip procps && apt-get clean && rm -rf /var/lib/apt/lists/* RUN cd /tmp && wget 'https://github.com/kharchenkolab/Baysor/releases/download/v0.7.1/baysor-x86_x64-linux-v0.7.1_build.zip' && unzip baysor-x86_x64-linux-v0.7.1_build.zip && mv ./bin/baysor /opt/ && rm ./baysor-x86_x64-linux-v0.7.1_build.zip @@ -8,6 +10,6 @@ ENV PATH="/opt/baysor/bin:${PATH}" # to avoid permission issues with the numba cache ENV NUMBA_CACHE_DIR=/tmp/numba_cache -RUN pip install --no-cache-dir sopa[baysor] +RUN pip install --no-cache-dir sopa[baysor]==${SOPA_VERSION} ENV PYTHONUNBUFFERED=1 diff --git a/docker/sopa-cellpose/Dockerfile b/docker/sopa-cellpose/Dockerfile index 4074a6bd..1cfdea89 100644 --- a/docker/sopa-cellpose/Dockerfile +++ b/docker/sopa-cellpose/Dockerfile @@ -1,5 +1,7 @@ FROM python:3.10-slim +ARG SOPA_VERSION + # needed for the open-cv dependency RUN apt-get update && apt-get install -y \ ffmpeg \ @@ -11,6 +13,6 @@ RUN apt-get update && apt-get install -y \ # to avoid permission issues with the numba cache ENV NUMBA_CACHE_DIR=/tmp/numba_cache -RUN pip install --no-cache-dir sopa[cellpose] +RUN pip install --no-cache-dir sopa[cellpose]==${SOPA_VERSION} ENV PYTHONUNBUFFERED=1 diff --git a/docker/sopa-proseg/Dockerfile b/docker/sopa-proseg/Dockerfile index 9bb63160..e72163bb 100644 --- a/docker/sopa-proseg/Dockerfile +++ b/docker/sopa-proseg/Dockerfile @@ -4,6 +4,8 @@ RUN cargo install proseg FROM python:3.10-slim +ARG SOPA_VERSION + COPY --from=rust-builder /usr/local/cargo/bin/proseg /usr/local/bin/proseg RUN apt-get update && apt-get install -y procps && apt-get clean && rm -rf /var/lib/apt/lists/* @@ -11,6 +13,6 @@ RUN apt-get update && apt-get install -y procps && apt-get clean && rm -rf /var/ # to avoid permission issues with the numba cache ENV NUMBA_CACHE_DIR=/tmp/numba_cache -RUN pip install --no-cache-dir sopa +RUN pip install --no-cache-dir sopa==${SOPA_VERSION} ENV PYTHONUNBUFFERED=1 diff --git a/docker/sopa-stardist/Dockerfile b/docker/sopa-stardist/Dockerfile index 2b4667b9..fb561a37 100644 --- a/docker/sopa-stardist/Dockerfile +++ b/docker/sopa-stardist/Dockerfile @@ -1,5 +1,7 @@ FROM python:3.10-slim +ARG SOPA_VERSION + # needed for the open-cv dependency RUN apt-get update && apt-get install -y \ ffmpeg \ @@ -11,6 +13,6 @@ RUN apt-get update && apt-get install -y \ # to avoid permission issues with the numba cache ENV NUMBA_CACHE_DIR=/tmp/numba_cache -RUN pip install --no-cache-dir sopa[stardist] +RUN pip install --no-cache-dir sopa[stardist]==${SOPA_VERSION} ENV PYTHONUNBUFFERED=1 diff --git a/docker/sopa/Dockerfile b/docker/sopa/Dockerfile index 1ddcbd24..7fa64d72 100644 --- a/docker/sopa/Dockerfile +++ b/docker/sopa/Dockerfile @@ -1,5 +1,7 @@ FROM python:3.10-slim +ARG SOPA_VERSION + # needed for the open-cv dependency RUN apt-get update && apt-get install -y \ ffmpeg \ @@ -11,6 +13,6 @@ RUN apt-get update && apt-get install -y \ # to avoid permission issues with the numba cache ENV NUMBA_CACHE_DIR=/tmp/numba_cache -RUN pip install --no-cache-dir sopa +RUN pip install --no-cache-dir sopa==${SOPA_VERSION} ENV PYTHONUNBUFFERED=1