-
Notifications
You must be signed in to change notification settings - Fork 0
Pixi Tasks Reference
Complete reference for all available Pixi tasks in Vision Text Extractor. These tasks provide convenient shortcuts for common operations.
# List all available tasks
pixi task list
# Get help for any task
pixi run <task-name> --help-
setup- Complete system validation -
setup-ollama- Install Ollama and LLaVA -
setup-smolvlm- Download SmolVLM model -
setup-env- Create environment file -
install-deps- Install dependencies
-
ocr_llm- General purpose OCR (flexible) -
ocr_ollama- Ollama LLaVA OCR (flexible) -
ocr_smolvlm- SmolVLM OCR (flexible) -
ocr_url_example- Test with online image
-
demo-ocr-huggingface- SmolVLM demo -
demo-ocr-ollama- Ollama demo -
demo-ocr-openai- OpenAI demo
-
test-setup- Validate dependencies -
test-components- Test functionality -
test-imports- Check imports -
check-env- Verify environment variables
-
clean- Clean cache and temporary files
Purpose: Complete system validation and setup
pixi run setup- β Validates all dependencies
- β Tests all AI providers
- β Checks environment configuration
- β Provides setup recommendations
Dependencies: None
Time: 30-60 seconds
Purpose: Install Ollama and download LLaVA model
pixi run setup-ollama- π₯ Downloads and installs Ollama
- π₯ Pulls LLaVA 7B model (~4GB)
- β Configures Ollama service
- β Tests model functionality
Dependencies: Internet connection
Time: 5-15 minutes (depending on internet speed)
Disk Space: ~4GB
Purpose: Download Hugging Face SmolVLM model
pixi run setup-smolvlm- π₯ Downloads SmolVLM-Instruct model (~2GB)
- β Configures Hugging Face cache
- β Tests model loading
- β Validates CUDA availability (if applicable)
Dependencies: Internet connection
Time: 3-10 minutes
Disk Space: ~2GB
Purpose: Create environment configuration file
pixi run setup-env- π Copies
.env.exampleto.env β οΈ Won't overwrite existing.env- π You must manually edit API keys
Dependencies: None
Time: < 1 second
Purpose: Install or refresh all dependencies
pixi run install-deps- π¦ Equivalent to
pixi install - π Useful for refreshing dependencies
- β Validates environment
Dependencies: Internet connection
Time: 1-5 minutes
Purpose: Flexible OCR using SmolVLM (requires image argument)
pixi run ocr_llm "path/to/image.jpg"
pixi run ocr_llm "https://example.com/image.png"- π€ Uses Hugging Face SmolVLM by default
- π Accepts local files or URLs
- βοΈ Requires prior
setup-smolvlm
Arguments: Image path (required)
Dependencies: setup-smolvlm
Purpose: Flexible OCR using Ollama LLaVA (requires image argument)
pixi run ocr_ollama "path/to/image.jpg"- π€ Uses Ollama LLaVA model
- π Accepts local files or URLs
- βοΈ Add
--provider ollama --model llava:7bfor explicit control
Arguments: Image path (required)
Dependencies: Manual Ollama setup or setup-ollama
Purpose: Explicit SmolVLM OCR (requires image argument)
pixi run ocr_smolvlm "path/to/image.jpg"- π€ Explicitly uses SmolVLM provider
- π Accepts local files or URLs
- βοΈ Identical to
ocr_llmbut more explicit
Arguments: Image path (required)
Dependencies: setup-smolvlm
Purpose: Test OCR with a fixed online image
pixi run ocr_url_example- π Uses fixed recipe image URL
- β Good for testing URL functionality
- π No arguments needed
Arguments: None
Dependencies: setup-smolvlm, Internet connection
Purpose: Quick SmolVLM demo with sample image
pixi run demo-ocr-huggingface- πΌοΈ Uses
images/chocolate_cake_recipe.png - π€ Hugging Face SmolVLM provider
- β Perfect for testing after installation
Arguments: None
Dependencies: setup-smolvlm
Purpose: Quick Ollama demo with sample image
pixi run demo-ocr-ollama- πΌοΈ Uses
images/chocolate_cake_recipe.png - π€ Ollama LLaVA 7B model
- β Good for comparing with SmolVLM
Arguments: None
Dependencies: setup-ollama
Purpose: Quick OpenAI demo with sample image
pixi run demo-ocr-openai- πΌοΈ Uses
images/chocolate_cake_recipe.png - π€ OpenAI GPT-4o model
- π Requires valid API key in
.env
Arguments: None
Dependencies: OpenAI API key in .env
Purpose: Validate all dependencies are working
pixi run test-setup- β Tests Python imports
- β Validates core libraries
- β Checks environment setup
- π Provides detailed status report
Arguments: None
Dependencies: None
Purpose: Test actual functionality without API calls
pixi run test-components- πΌοΈ Tests image loading
- π Validates file paths
- π§ Tests component integration
β οΈ No actual AI model calls
Arguments: None
Dependencies: None
Purpose: Quick import validation
pixi run test-imports- β‘ Fast dependency check
- π¦ Tests critical imports only
- β Good for CI/CD pipelines
Arguments: None
Dependencies: None
Purpose: Verify environment variables
pixi run check-env- π Checks OpenAI API key status
- π Validates
.envfile β οΈ Shows which keys are set/missing
Arguments: None
Dependencies: None
Purpose: Clean cache and temporary files
pixi run clean- π§Ή Removes
.pixicache - ποΈ Cleans Python
__pycache__directories - πΎ Frees up disk space
β οΈ Safe to run anytime
Arguments: None
Dependencies: None
# Complete installation and setup
pixi install
pixi run setup-env # Create .env file
pixi run setup-smolvlm # Download SmolVLM (recommended)
pixi run test-setup # Validate everything
pixi run demo-ocr-huggingface # Test with sample# Process your images
pixi run ocr_llm "my-document.pdf"
pixi run ocr_ollama "receipt.jpg"
# Compare providers
pixi run demo-ocr-huggingface
pixi run demo-ocr-ollama
pixi run demo-ocr-openai# Diagnose issues
pixi run test-imports # Check dependencies
pixi run test-components # Test functionality
pixi run check-env # Verify API keys
pixi run clean # Clear cache if needed# Enter development environment
pixi shell -e dev
jupyter lab
# Test changes
pixi run test-setup
pixi run test-components# Run multiple tasks in sequence
pixi run setup-smolvlm && pixi run demo-ocr-huggingface
# Conditional execution
pixi run test-setup && pixi run ocr_llm "image.jpg"# Most tasks accept additional arguments
pixi run ocr_llm "image.jpg" --prompt "Extract specific data"
pixi run demo-ocr-huggingface --prompt "Focus on ingredients only"# Set custom cache locations
HF_HOME=/custom/path pixi run setup-smolvlm
OLLAMA_MODELS=/custom/path pixi run setup-ollamaThis reference covers all available Pixi tasks. Use these shortcuts to streamline your Vision Text Extractor workflow!