generated from FNNDSC/python-chrisapp-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9d9e55f
commit 28e9496
Showing
2 changed files
with
19 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,29 @@ | ||
# Python version can be changed, e.g. | ||
# FROM python:3.8 | ||
# FROM ghcr.io/mamba-org/micromamba:1.5.1-focal-cuda-11.3.1 | ||
FROM docker.io/python:3.12.0-slim-bookworm | ||
|
||
LABEL org.opencontainers.image.authors="FNNDSC <[email protected]>" \ | ||
org.opencontainers.image.title="Zero MRI Background" \ | ||
org.opencontainers.image.description="Set the background intensity of a MRI to 0" | ||
FROM docker.io/mambaorg/micromamba:1.5.5-bookworm-slim AS micromamba | ||
FROM micromamba AS builder | ||
|
||
RUN \ | ||
--mount=type=cache,sharing=private,target=/home/mambauser/.mamba/pkgs,uid=57439,gid=57439 \ | ||
--mount=type=cache,sharing=private,target=/opt/conda/pkgs,uid=57439,gid=57439 \ | ||
micromamba -y -n base install -c conda-forge python=3.12 nibabel=5.2.0 numpy=1.26.3 tqdm=4.66.1 | ||
|
||
ARG SRCDIR=/usr/local/src/pl-zerobg | ||
ARG SRCDIR=/home/mambauser/pl-zerobg | ||
RUN mkdir "${SRCDIR}" | ||
WORKDIR ${SRCDIR} | ||
|
||
COPY requirements.txt . | ||
RUN --mount=type=cache,sharing=private,target=/root/.cache/pip pip install -r requirements.txt | ||
ARG MAMBA_DOCKERFILE_ACTIVATE=1 | ||
RUN pip install -r requirements.txt | ||
|
||
COPY . . | ||
ARG extras_require=none | ||
RUN pip install ".[${extras_require}]" \ | ||
&& cd / && rm -rf ${SRCDIR} | ||
RUN pip install . && cd / && rm -rf ${SRCDIR} | ||
WORKDIR / | ||
|
||
CMD ["zb"] | ||
|
||
LABEL org.opencontainers.image.authors="FNNDSC <[email protected]>" \ | ||
org.opencontainers.image.title="Zero MRI Background" \ | ||
org.opencontainers.image.description="Set the background intensity of a MRI to 0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
chris_plugin==0.4.0 | ||
nibabel==5.2.0 | ||
tqdm==4.66.1 | ||
nibabel~=5.2.0 | ||
numpy~=1.26.3 | ||
tqdm~=4.66.1 |