Package installation#434
Open
anshisax wants to merge 11 commits into
Open
Conversation
Add PACKAGE_INSTALLATION_GUIDE.md with three approaches for pre-installing packages in Workbench apps: 1. Devcontainer Features (easiest for R packages) - Use ghcr.io/rocker-org/devcontainer-features/r-packages - Simple comma-separated package list - Auto-installs system dependencies 2. Custom Dockerfile (best for Python packages) - Add RUN pip install commands - Cached in image layers for fast startup - Full version control 3. Post-create scripts (most flexible) - Supports mixed R + Python environments - Dynamic installation from requirements.txt Includes: - Complete working examples (R Analysis, Jupyter ML/AI stack) - Comparison table showing when to use each approach - FAQ section addressing common questions - Copy-paste templates for quick setup This addresses the common user need to avoid running pip install or install.packages() every time they create an app, without requiring the complexity of custom app options. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Add a devcontainer feature that solves the common use case: users want
specific packages pre-installed to avoid running pip install or
install.packages() every time they create an app.
Features:
- Curated package presets (basic, ml, bio, full)
- Works for both Python and R
- Custom package support on top of presets
- No Dockerfile needed - just add to .devcontainer.json
Example usage:
{
"features": {
"ghcr.io/verily-src/workbench-app-devcontainers/common-packages": {
"pythonPackages": "basic",
"customPythonPackages": "mypackage",
"rPackages": "basic",
"customRPackages": "zoo,forecast"
}
}
}
This is simpler than custom app options for the common case where users
just want "R Analysis with these 15 packages".
Also updated PACKAGE_INSTALLATION_GUIDE.md to feature this approach first.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Remove presets. Users just specify their package list:
{
"features": {
"common-packages": {
"pythonPackages": "pandas numpy scikit-learn",
"rPackages": "tidyverse,ggplot2,dplyr,plotly,shiny"
}
}
}
This solves the exact use case: 'R Analysis with these 15 packages
pre-installed' without the complexity of custom app options.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Enables workflow: User: 'I want R with tidyverse, ggplot2, plotly' Claude: Generates complete devcontainer directory with those packages pre-installed Output can go in user's own repo - doesn't need to be in workbench-app-devcontainers. Skill teaches Claude to use the common-packages feature for package pre-installation. Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Renamed skill to CREATE_CUSTOM_APP_WITH_PACKAGES (not just R) - Feature works for Jupyter, VSCode, RStudio, etc. - Supports both Python and R packages - Simplified documentation Users can request any app type with any packages: - 'I want Jupyter with pandas and numpy' - 'I want VSCode with tensorflow' - 'I want R with tidyverse' Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Remove 63 files (duplicate app templates and embedded features) - Add INSTALL_PACKAGES.md skill for natural language package requests - Simplify PACKAGE_INSTALLATION_GUIDE.md to focus on two approaches: 1. Natural language with Claude (easiest) 2. Pre-install with common-packages feature - Keep core common-packages feature for pre-installation - Enable Claude to understand requests like 'I need ggplot2' or 'set me up for machine learning' This reduces the PR from 69 files to 6 files while enabling more flexible package installation through natural language.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Users want specific packages pre-installed so they don't have to run
pip installorinstall.packages()every time they create an app. Custom app options are too complex for simple cases like "R Analysis with these 15 packages."Solution
Natural language package installation - users can ask Claude for packages in plain English:
Examples:
Two approaches:
Pre-install (common-packages feature) - packages available at app startup
{ "features": { "ghcr.io/verily-src/workbench-app-devcontainers/common-packages": { "pythonPackages": "tensorflow scikit-learn pandas", "rPackages": "Seurat,DESeq2,ggplot2" } } }On-demand (natural language with Claude) - install as needed while working
!pip install plotlyWhat's Added
features/src/common-packages/- Feature for pre-installing packagesfeatures/src/llm-context/skills/INSTALL_PACKAGES.md- Natural language skill for ClaudePACKAGE_INSTALLATION_GUIDE.md- User documentationImpact
Before: 69 file changes (duplicate templates, embedded features)
After: 6 net file additions (removed 63 redundant files)
Users can pre-install packages with natural language OR explicit lists - simpler and more flexible than custom app options.
Examples
Machine learning:
{"pythonPackages": "scikit-learn xgboost tensorflow torch pandas numpy matplotlib"}Genomics:
{"rPackages": "Seurat,DESeq2,GenomicRanges,tidyverse,ggplot2"}On-demand in Jupyter:
User: "I need deep learning packages"
Claude:
!pip install tensorflow torch transformers kerashttps://verily.atlassian.net/browse/BENCH-8796