Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Aug 18, 2025

This PR implements two new group directives that wrap common container building patterns, as requested in issue #49.

Git Clone Group Directive

Provides a streamlined interface for cloning git repositories with advanced options:

  • Repository URL: Supports both HTTPS and SSH URLs
  • Revision/tag support: Specify branches, tags, or commit hashes to checkout specific versions
  • Recursive cloning: Include git submodules when needed
  • Cleanup option: Remove .git directory after cloning to reduce image size
  • Flexible destination paths: Configure where the repository is cloned

Generated Neurodocker commands:

git clone [--recursive] "https://github.com/user/repo.git" "/opt/repository"
cd "/opt/repository" && git checkout "v1.2.3"  # when revision specified
rm -rf "/opt/repository/.git"  # when cleanup enabled

Pip Install Group Directive

Provides enhanced Python package installation with conda environment integration:

  • Conda environment support: Install packages into specific conda environments using conda run -n <env>
  • Multiline package specification: One package per line with version support (e.g., numpy==1.21.0)
  • Advanced PyPI configuration: Custom index URLs for private repositories
  • Configurable pip options: Additional flags like --no-cache-dir
  • Automatic pip upgrade: Option to upgrade pip before installation

Generated Neurodocker commands:

conda run -n myenv python -m pip install --upgrade pip
conda run -n myenv python -m pip install --no-cache-dir numpy scipy matplotlib

Implementation Details

Both directives follow the established group directive pattern:

  • Comprehensive form interfaces with validation
  • Help documentation with usage examples
  • Advanced settings sections for power users
  • Real-time parameter updates
  • Consistent UI styling and behavior

Screenshots

The new directives are fully integrated into the directive selector:

New directives in UI

Both directives provide intuitive configuration interfaces with all the requested features:

Both directives working

These directives address common containerization workflows and make it easier to build containers that clone source code at specific versions and install Python packages into conda environments.

Fixes #49.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • fonts.googleapis.com
    • Triggering command: next-server (v15.3.3) (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

…ve features

Co-authored-by: Vbitz <368827+Vbitz@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Add a git clone and pip install group directive. Add Git Clone and Pip Install group directives with revision/tag and conda environment support Aug 18, 2025
@Copilot Copilot AI requested a review from Vbitz August 18, 2025 06:18
Copilot finished work on behalf of Vbitz August 18, 2025 06:18
@Vbitz Vbitz marked this pull request as ready for review August 18, 2025 06:19
@Vbitz Vbitz merged commit 72e9bd1 into main Aug 18, 2025
1 check passed
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.

Add a git clone and pip install group directive.
2 participants