Skip to content

Commit 272da7b

Browse files
authored
Merge branch 'main' into external_flats
2 parents e3853d2 + cc7cc3e commit 272da7b

2 files changed

Lines changed: 74 additions & 0 deletions

File tree

.github/workflows/container.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build and Push Container Image
2+
3+
on:
4+
push:
5+
tags:
6+
- v*
7+
8+
jobs:
9+
build-and-push-image:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
packages: write
14+
steps:
15+
- name: Checkout Code
16+
uses: actions/checkout@v4
17+
18+
- name: Log in to GitHub Container Registry
19+
uses: docker/login-action@v3
20+
with:
21+
registry: ghcr.io
22+
username: ${{ github.actor }}
23+
password: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Extract Version from Tag
26+
id: tags
27+
run: echo version=$(echo "${{ github.ref_name }}" | cut -c 2-) >> $GITHUB_OUTPUT
28+
29+
- name: Docker Metadata
30+
id: meta
31+
uses: docker/metadata-action@v5
32+
with:
33+
images: ghcr.io/${{ github.repository }}
34+
tags: |
35+
type=raw,value=${{ steps.tags.outputs.version }}
36+
type=raw,value=latest
37+
38+
- name: Set up Docker Buildx
39+
uses: docker/setup-buildx-action@v3
40+
41+
- name: Build and Push Image
42+
uses: docker/build-push-action@v6
43+
with:
44+
push: true
45+
context: .
46+
tags: ${{ steps.meta.outputs.tags }}
47+
target: deploy

Dockerfile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
FROM mambaorg/micromamba:2.0.8-debian12-slim AS build
2+
3+
USER root
4+
5+
RUN apt update && apt install -y git && apt clean
6+
7+
RUN micromamba install -y python=3.11 blas[build=mkl] 'numpy<2' scipy scikit-image tqdm pyyaml pillow click cuda-version=12.8
8+
RUN micromamba install -y openmpi=4.1.6 mpi
9+
RUN micromamba install -y h5py[build=*openmpi*] hdf5plugin
10+
RUN micromamba install -y mpi4py
11+
RUN micromamba install -y aiofiles graypy imageio loguru pluggy pytest iniconfig
12+
RUN micromamba install -y tomopy=1.15
13+
RUN micromamba install -y cupy=12.3.0 nvtx
14+
RUN micromamba install -y -c astra-toolbox astra-toolbox
15+
RUN micromamba run python -m pip install ccpi-regularisation-cupy
16+
RUN micromamba run python -m pip install tomobar
17+
RUN micromamba run python -m pip install --no-deps httomolib httomolibgpu httomo-backends
18+
RUN micromamba clean -y --all --force-pkgs-dirs
19+
20+
COPY . .
21+
RUN micromamba run python -m pip install --no-deps .
22+
23+
FROM mambaorg/micromamba:cuda12.8.1-ubuntu22.04 AS deploy
24+
25+
COPY --from=build /opt/conda /opt/conda
26+
27+
ENTRYPOINT ["micromamba", "run", "python", "-m", "httomo", "run"]

0 commit comments

Comments
 (0)