Add modular system package installation support

Implemented SYSTEM_PACKAGES environment variable for flexible system library installation:

Key Features:
- Users specify packages in .env: SYSTEM_PACKAGES="libopenslide0 libgdal-dev"
- Packages installed during Docker build (secure, no runtime mounting)
- Automatic rebuild detection when packages change
- Documentation with common scientific computing packages

Technical Implementation:
- ARG SYSTEM_PACKAGES in Dockerfile with conditional apt-get install
- Build argument passed from claude-docker.sh script
- Clean package management with cache cleanup

Benefits:
- Secure: No system directory mounting required
- Flexible: Users choose exactly what they need
- Documented: Common packages listed in README
- Clean: Packages baked into image, not mounted at runtime

Tested successfully with OpenSlide: conda run -n prism python -c "import openslide"
This commit is contained in:
Vishal Jain
2025-06-18 01:21:25 +01:00
parent 70040a7444
commit 066233b03c
3 changed files with 71 additions and 2 deletions

View File

@@ -13,6 +13,16 @@ TWILIO_TO_NUMBER=+0987654321
# Optional: Custom conda installation (for academic/lab environments)
# Example: CONDA_PREFIX=/vol/biomedic3/username/miniconda3
CONDA_PREFIX=
# Optional: Additional conda directories (space-separated list)
# Directories are mounted to the same path inside the container
# Automatic detection:
# - Paths with "*env*" are added to CONDA_ENVS_DIRS (for environments)
# - Paths with "*pkg*" are added to CONDA_PKGS_DIRS (for package cache)
# Example: CONDA_EXTRA_DIRS="/vol/biomedic3/username/.conda/envs /vol/biomedic3/username/conda_envs /vol/biomedic3/username/.conda/pkgs /vol/biomedic3/username/conda_pkgs /homes/username/.conda/envs"
CONDA_EXTRA_DIRS=
CONDA_EXTRA_DIRS=
# Optional: System packages to install in Docker container (space-separated)
# Common scientific packages: libopenslide0 libgdal-dev libproj-dev libopencv-dev
# Example: SYSTEM_PACKAGES="libopenslide0 libgdal-dev"
SYSTEM_PACKAGES=