Skip to content

Commit 121ba53

Browse files
Merge pull request #749 from DiamondLightSource/reduce-container-image-size
Reduce container image size
2 parents 61b8a94 + 0acd13f commit 121ba53

1 file changed

Lines changed: 5 additions & 11 deletions

File tree

‎Dockerfile‎

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
11
FROM mambaorg/micromamba:2.0.8-debian12-slim AS build
22

3-
RUN micromamba install -y python=3.12 blas[build=mkl] 'numpy=2.4.*' scipy tqdm pyyaml pillow click gcc
4-
RUN micromamba install -y openmpi=4.1.6 mpi
5-
RUN micromamba install -y h5py[build=*openmpi*] hdf5plugin
6-
RUN micromamba install -y mpi4py
7-
RUN micromamba install -y aiofiles graypy imageio loguru pluggy pytest iniconfig
8-
RUN micromamba install -y tomopy=1.15.3 scikit-image
9-
RUN micromamba install -y cuda-version=12.9 cuda-cudart==12.9.* cupy=14.0.* nvtx
10-
RUN micromamba install -y -c astra-toolbox -c conda-forge astra-toolbox::astra-toolbox
11-
RUN micromamba run python -m pip install tomobar
12-
RUN micromamba run python -m pip install --no-deps httomolib httomolibgpu httomo-backends
3+
RUN micromamba install -y -c astra-toolbox -c conda-forge python=3.12 blas[build=mkl] 'numpy=2.4.*' tqdm pyyaml pillow click gcc openmpi=4.1.6 mpi h5py[build=*openmpi*] hdf5plugin mpi4py aiofiles graypy imageio loguru iniconfig tomopy=1.15.3 scikit-image cuda-version=12.9 cuda-cudart==12.9.* cupy=14.0.* nvtx astra-toolbox::astra-toolbox
4+
RUN micromamba run python -m pip install --no-cache-dir --no-deps tomobar httomolib httomolibgpu httomo-backends
5+
RUN micromamba uninstall -n base -y gcc
136
RUN micromamba clean -y --all --force-pkgs-dirs
147

158
COPY . .
16-
RUN micromamba run python -m pip install --no-deps .
9+
RUN micromamba run python -m pip install --no-cache-dir --no-deps .
1710

1811
FROM nvidia/cuda:12.9.1-base-ubuntu24.04 AS deploy
1912

2013
COPY --from=build /opt/conda /opt/conda
2114
ENV CONDA_PREFIX=/opt/conda
15+
ENV OMPI_MCA_plm_rsh_agent=
2216

2317
ENTRYPOINT ["/opt/conda/bin/python", "-m", "httomo", "run"]

0 commit comments

Comments
 (0)