Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
!gadgets/
!justfile
!libmrd/
!mri/
!test/
!toolboxes/
!environment.yml
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/pingvin-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ permissions:

env:
imageBaseName: ghcr.io/gadgetron/pingvin/ubuntu22.04
miniforgeVersion: 24.11.3-0

defaults:
run:
Expand Down Expand Up @@ -105,8 +106,8 @@ jobs:
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
environment-file: conda/environment.yml
miniforge-version: ${{env.miniforgeVersion}}
environment-file: conda/build-environment.yml
activate-environment: pingvin-build

- name: Build conda package
Expand All @@ -129,8 +130,8 @@ jobs:
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-version: latest
environment-file: conda/environment.yml
miniforge-version: ${{env.miniforgeVersion}}
environment-file: conda/build-environment.yml
activate-environment: pingvin-build

- name: Download Conda package
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,6 @@ if (BUILD_PYTHON_SUPPORT)

message(STATUS "Found NumPy:")
message(STATUS "NumPy include: ${Python3_NumPy_INCLUDE_DIRS}")
message(STATUS "NumPy libraries: ${Python3_NumPy_LIBRARIES}")
message(STATUS "Python3 libraries: ${Python3_LIBRARIES}")

if (Python3_VERSION_MINOR LESS 7)
Expand Down Expand Up @@ -318,6 +317,7 @@ add_subdirectory(cmake)
add_subdirectory(core)
add_subdirectory(gadgets)
add_subdirectory(toolboxes)
add_subdirectory(mri)

option(BUILD_WITH_GPERFTOOLS_PROFILER "Build with the gperftools profiler." Off)
if (BUILD_WITH_GPERFTOOLS_PROFILER)
Expand Down
19 changes: 10 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ RUN groupadd --gid $USER_GID $USERNAME \
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
&& chmod 0440 /etc/sudoers.d/$USERNAME

ARG MINIFORGE_VERSION=24.3.0-0
ARG MINIFORGE_VERSION=24.11.3-0
ARG CONDA_GID=900

# Based on https://github.com/conda-forge/miniforge-images/blob/master/ubuntu/Dockerfile
Expand Down Expand Up @@ -70,13 +70,16 @@ RUN wget --quiet "https://github.com/microsoft/yardl/releases/download/v${YARDL_
&& mv yardl "/usr/local/bin/" \
&& rm "yardl_${YARDL_VERSION}_linux_x86_64.tar.gz"

# Set OMP wait policy for better OpenMP performance on Ubuntu
ENV OMP_WAIT_POLICY=PASSIVE

FROM pingvin_baseimage AS pingvin_dev_cuda
ARG USER_UID
ARG HOME
USER ${USER_UID}
RUN mkdir -p ${HOME}/.cache/conda/notices && sudo chown -R ${USER_UID}:conda ${HOME}/.cache/conda/notices
RUN grep -v "#.*\<NOFILTER\>" /tmp/build/environment.yml > /tmp/build/filtered_environment.yml
RUN umask 0002 && /opt/conda/bin/conda env create -f /tmp/build/filtered_environment.yml && /opt/conda/bin/conda clean -afy && sudo chown -R :conda /opt/conda
RUN umask 0002 && /opt/conda/bin/mamba env create -f /tmp/build/filtered_environment.yml && /opt/conda/bin/conda clean -afy && sudo chown -R :conda /opt/conda
USER root

FROM pingvin_baseimage AS pingvin_dev_nocuda
Expand All @@ -85,7 +88,7 @@ ARG HOME
USER ${USER_UID}
RUN mkdir -p ${HOME}/.cache/conda/notices && sudo chown -R ${USER_UID}:conda ${HOME}/.cache/conda/notices
RUN grep -v "#.*\<cuda\>" /tmp/build/environment.yml > /tmp/build/filtered_environment.yml
RUN umask 0002 && /opt/conda/bin/conda env create -f /tmp/build/filtered_environment.yml && /opt/conda/bin/conda clean -afy && sudo chown -R :conda /opt/conda
RUN umask 0002 && /opt/conda/bin/mamba env create -f /tmp/build/filtered_environment.yml && /opt/conda/bin/conda clean -afy && sudo chown -R :conda /opt/conda
USER root

FROM pingvin_dev_cuda AS pingvin_build_cuda
Expand All @@ -100,8 +103,7 @@ RUN . /opt/conda/etc/profile.d/conda.sh && umask 0002 && conda activate pingvin
mkdir build && \
cd build && \
cmake ../ -GNinja -DUSE_MKL=ON -DCMAKE_INSTALL_PREFIX=/opt/package && \
ninja && \
ninja install
ninja -j $(nproc) install

FROM pingvin_dev_nocuda AS pingvin_build_nocuda
ARG USER_UID
Expand All @@ -115,16 +117,15 @@ RUN . /opt/conda/etc/profile.d/conda.sh && umask 0002 && conda activate pingvin
mkdir build && \
cd build && \
cmake ../ -GNinja -DUSE_MKL=ON -DCMAKE_INSTALL_PREFIX=/opt/package && \
ninja && \
ninja install
ninja -j $(nproc) install

FROM pingvin_baseimage AS pingvin_rt_cuda
ARG USER_UID
ARG HOME
USER ${USER_UID}
RUN mkdir -p ${HOME}/.cache/conda/notices && sudo chown -R ${USER_UID}:conda ${HOME}/.cache/conda/notices
RUN grep -v "#.*\<dev\>" /tmp/build/environment.yml > /tmp/build/filtered_environment.yml
RUN umask 0002 && /opt/conda/bin/conda env create -f /tmp/build/filtered_environment.yml && /opt/conda/bin/conda clean -afy && sudo chown -R :conda /opt/conda
RUN umask 0002 && /opt/conda/bin/mamba env create -f /tmp/build/filtered_environment.yml && /opt/conda/bin/conda clean -afy && sudo chown -R :conda /opt/conda
COPY --from=pingvin_build_cuda --chown=$USER_UID:conda /opt/package /opt/conda/envs/pingvin/
COPY --from=pingvin_build_cuda --chown=$USER_UID:conda /opt/code/pingvin/docker/entrypoint.sh /opt/
RUN chmod +x /opt/entrypoint.sh
Expand All @@ -138,7 +139,7 @@ ARG HOME
USER ${USER_UID}
RUN mkdir -p ${HOME}/.cache/conda/notices && sudo chown -R ${USER_UID}:conda ${HOME}/.cache/conda/notices
RUN grep -v "#.*\<cuda\|dev\>" /tmp/build/environment.yml > /tmp/build/filtered_environment.yml
RUN umask 0002 && /opt/conda/bin/conda env create -f /tmp/build/filtered_environment.yml && /opt/conda/bin/conda clean -afy && sudo chown -R :conda /opt/conda
RUN umask 0002 && /opt/conda/bin/mamba env create -f /tmp/build/filtered_environment.yml && /opt/conda/bin/conda clean -afy && sudo chown -R :conda /opt/conda
COPY --from=pingvin_build_nocuda --chown=$USER_UID:conda /opt/package /opt/conda/envs/pingvin/
COPY --from=pingvin_build_nocuda --chown=$USER_UID:conda /opt/code/pingvin/docker/entrypoint.sh /opt/
RUN chmod +x /opt/entrypoint.sh
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Gadgetron
Copyright (c) 2025 Gadgetron

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion apps/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
add_subdirectory(pingvin)
add_subdirectory(pingvin)
53 changes: 14 additions & 39 deletions apps/pingvin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,50 +1,22 @@
find_package(PugiXML REQUIRED)

configure_file(pingvin_config.in pingvin_config.h)

add_executable(pingvin
main.cpp
initialization.cpp
initialization.h
system_info.cpp

Loader.cpp
Loader.h

Config.cpp
Config.h

ErrorHandler.h

nodes/Processable.h
nodes/Processable.cpp

nodes/Stream.cpp
nodes/Stream.h
nodes/Parallel.cpp
nodes/Parallel.h
nodes/ParallelProcess.cpp
nodes/ParallelProcess.h
nodes/PureStream.cpp
nodes/PureStream.h
)
add_executable(pingvin main.cc)

target_link_libraries(pingvin
pingvin_core
pingvin_toolbox_log
pingvin_toolbox_mri_core
pingvin_mri
pingvin_mricore
pingvin_epi
pingvin_grappa
pingvin_cmr
pingvin_examples
Boost::system
Boost::filesystem
Boost::program_options
${PUGIXML_LIBRARIES}
GTBLAS
${CMAKE_DL_LIBS})
GTBLAS)

target_include_directories(pingvin
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR})

${CMAKE_BINARY_DIR}
${CMAKE_SOURCE_DIR}
)

if (REQUIRE_SIGNED_CONFIG)
target_link_libraries(pingvin GTBabylon)
Expand All @@ -60,3 +32,6 @@ if (GPERFTOOLS_PROFILER)
endif ()

install(TARGETS pingvin DESTINATION bin COMPONENT main)

file(GLOB_RECURSE PIPELINE_CONFIG_FILES ${CMAKE_CURRENT_SOURCE_DIR}/pipelines/*/config/*.conf)
install(FILES ${PIPELINE_CONFIG_FILES} DESTINATION ${PINGVIN_INSTALL_CONFIG_PATH} COMPONENT main)
Loading
Loading