Skip to content

Package installation#434

Open
anshisax wants to merge 9 commits into
masterfrom
package-installation
Open

Package installation#434
anshisax wants to merge 9 commits into
masterfrom
package-installation

Conversation

@anshisax

Copy link
Copy Markdown

Problem

Users want a few specific packages pre-installed so they don't have to run pip install or install.packages() every time they create an app. Custom app options are too complex for simple cases like "R Analysis with these 15 packages."

Solution
R packages:

  • tidyverse - Collection of R packages for data science
  • ggplot2 - Visualization
  • dplyr - Data manipulation
  • plotly - Interactive plots
  • shiny - Web apps
  • DT - Interactive tables
  • data.table - Fast data manipulation
  • caret, randomForest - Machine learning
  • bigrquery, googleCloudStorageR - Google Cloud integration
  • arrow - Apache Arrow for large datasets
  • lubridate, readr, tidyr - Data utilities
    Packages are pre-installed. No install.packages() needed every app
    launch.

What's Added

  • features/src/common-packages/ - Feature that installs your
    package list
  • PACKAGE_INSTALLATION_GUIDE.md - Documentation

Impact

Users can pre-install packages with one line - simpler than custom
app options.

anshisax and others added 4 commits June 17, 2026 12:12
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>
@anshisax anshisax requested review from a team as code owners June 17, 2026 21:28
anshisax and others added 5 commits June 17, 2026 15:31
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>
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.

1 participant