Skip to content

fix: add --skip-gguf flag to avoid forced pip install#499

Open
Jah-yee wants to merge 1 commit intomicrosoft:mainfrom
Jah-yee:fix/skip-gguf-flag
Open

fix: add --skip-gguf flag to avoid forced pip install#499
Jah-yee wants to merge 1 commit intomicrosoft:mainfrom
Jah-yee:fix/skip-gguf-flag

Conversation

@Jah-yee
Copy link
Copy Markdown

@Jah-yee Jah-yee commented Mar 19, 2026

Summary

Adds an optional --skip-gguf flag to setup_env.py to make GGUF pip installation optional, preventing environment conflicts in custom venvs, CI pipelines, and docker environments.

Changes

  • Added --skip-gguf argument to argparse
  • Modified setup_gguf() to accept a skip parameter
  • When --skip-gguf is set, the pip install is skipped with a log message
  • Default behavior unchanged (installs if flag not set) for backward compatibility

Use Cases

  • Custom Python environments with pre-installed gguf-py
  • CI/CD pipelines where dependencies are managed externally
  • Docker containers with layered dependency management
  • Users who prefer manual dependency installation

Testing

Tested locally by:

  1. Running python setup_env.py --skip-gguf ... - correctly skips installation
  2. Running python setup_env.py ... without flag - maintains existing behavior

Fixes #498

- Add optional --skip-gguf flag to make GGUF pip installation optional
- Default behavior unchanged (installs if flag not set)
- Useful for custom venvs, CI pipelines, and docker environments
- Resolves: environment conflicts from forced pip installation

Fixes microsoft#498
shreyashjagtap157 added a commit to shreyashjagtap157/BitNet that referenced this pull request Mar 28, 2026
…osoft#504

- Add --skip-gguf flag to avoid forced pip install (fixes microsoft#498, microsoft#499)
- Fix sys.exit(1) indentation bug in run_command() (fixes microsoft#447)
- Change exit(0) to sys.exit(1) for unsupported arch
- Fix ARCH_ALIAS KeyError using .get() for unknown architectures
- Add guard for unsupported architectures in parse_args()
- Fix same indentation bug in e2e_benchmark.py (fixes microsoft#504)
shreyashjagtap157 added a commit to shreyashjagtap157/BitNet that referenced this pull request Mar 28, 2026
…osoft#504

- Add --skip-gguf flag to avoid forced pip install (fixes microsoft#498, microsoft#499)
- Fix sys.exit(1) indentation bug in run_command() (fixes microsoft#447)
- Change exit(0) to sys.exit(1) for unsupported arch
- Fix ARCH_ALIAS KeyError using .get() for unknown architectures
- Add guard for unsupported architectures in parse_args()
- Fix same indentation bug in e2e_benchmark.py (fixes microsoft#504)
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.

setup_env.py triggers unwanted pip install, causing environment conflicts

1 participant