Skip to content

Conversation

@rohitx01
Copy link

@rohitx01 rohitx01 commented Nov 2, 2025

Description

Consolidates duplicate Dockerfiles into a single unified version using Docker build arguments.

Addresses: #115 - Task #4 (Fresh Installation Testing)

Problem Solved

Previously maintained two separate, nearly identical Dockerfiles:

  1. Docker/Dockerfile - Standalone IVIM fitting
  2. kaapana_ivim_osipi/.../Dockerfile - Kaapana deployment

This created maintenance overhead and code duplication.

Solution

Created Docker/Dockerfile.unified with build arguments:

  • BASE_IMAGE (default: python:3.11-slim) - Specify base Docker image
  • ENV_TYPE (default: standalone) - Choose environment type

Building

Standalone (default)

docker build --build-arg ENV_TYPE=standalone
-t ivim-fitting:standalone
-f Docker/Dockerfile.unified .

Kaapana Deployment

docker build --build-arg BASE_IMAGE=local-only/base-python-cpu:latest
--build-arg ENV_TYPE=kaapana
-t ivim-fitting:kaapana
-f Docker/Dockerfile.unified .

Testing Completed

Local Testing (Docker Desktop - Windows)

  • Standalone build succeeds

  • Image ID: 75a626d42f0b

  • Size: 13.2GB

  • Entry point: python3 -m WrapImage.nifti_wrapper

  • Kaapana build succeeds (with python:3.11-slim base)

  • Image ID: f662fb55bfee

  • Size: 14GB

  • Entry point: python3 -u -m WrapImage.nifti_wrapper_kaapana

  • Both conditional logic statements work correctly

  • File copying and dependencies install without errors

  • Build scripts execute correctly

Integration Testing (Requires Kaapana Platform)

  • Runtime with actual local-only/base-python-cpu:latest base image
  • Volume mounts work (OPERATOR_IN_DIR, OPERATOR_OUT_DIR)
  • MinIO data integration
  • Airflow DAG execution in Kaapana UI
  • Workflow submission through web interface

Files Added

  • Docker/Dockerfile.unified - Unified Dockerfile
  • Docker/build-standalone.sh - Standalone build script
  • Docker/build-kaapana.sh - Kaapana build script
  • Docker/DOCKERFILE_MERGE.md - Detailed documentation

Related

Note: Testing limited to local Docker Desktop due to hardware constraints. Both image variants build successfully and are ready for integration testing in a Kaapana deployment environment.

…ask OSIPI#4)

- Create unified Dockerfile.unified supporting both standalone and Kaapana
- Add build-standalone.sh and build-kaapana.sh convenience scripts
- Document consolidation approach and testing performed
- Uses ARG for BASE_IMAGE and ENV_TYPE configuration

 Testing completed:
- Standalone build: Successfully created (13.2GB)
  Image ID: 75a626d42f0b
- Kaapana build: Successfully created (14GB)
  Image ID: f662fb55bfee
- Both images build without errors
- Conditional logic (if statements) work correctly
- Entry points properly configured for each environment

 Integration testing requires:
- Actual Kaapana base image (local-only/base-python-cpu:latest)
- Kaapana platform deployment
- Workflow execution in Kaapana UI
@rohitx01 rohitx01 mentioned this pull request Nov 2, 2025
5 tasks
@Unique-Usman
Copy link
Contributor

@etpeterson, while I take a look at this, whenever you are chanced, you can also take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants