PiNS / DOCKER_EXPORT.md
ft42's picture
Upload 4 files
f6b0f0b verified

Docker Image Export/Import Instructions

1. Save Docker Image to File

After the build completes, save the image as a .tar file:

cd /data/usr/ft42/CVIT_XAI/LungRADS_Modeling/CLARITY/PiNS
docker save medical-imaging/nodule-segmentation:latest -o medical-imaging-nodule-segmentation.tar

2. Compress the Image (Optional - Recommended)

Compress the .tar file to save space:

gzip medical-imaging-nodule-segmentation.tar
# This creates: medical-imaging-nodule-segmentation.tar.gz

3. Check File Size

ls -lh medical-imaging-nodule-segmentation.tar*

4. Load Image on Another Machine

To use the saved image on another machine:

# If compressed:
gunzip medical-imaging-nodule-segmentation.tar.gz

# Load the image:
docker load -i medical-imaging-nodule-segmentation.tar

# Verify it loaded:
docker images | grep medical-imaging

5. Share the Image

You can now share the .tar.gz file:

  • Copy to USB drive
  • Upload to cloud storage
  • Transfer via network
  • Include in project distribution

File Size Expectations

  • Uncompressed .tar: ~1.5-2.0 GB
  • Compressed .tar.gz: ~800MB-1.2GB

Alternative: Docker Hub (Optional)

You can also push to Docker Hub for easy sharing:

# Tag the image
docker tag medical-imaging/nodule-segmentation:latest ft42/nodule-segmentation:latest

# Push to Docker Hub
docker push ft42/nodule-segmentation:latest

Usage After Import

Once loaded, use exactly as before:

./scripts/DLCS24_KNN_2mm_Extend_Seg.sh