Skip to content

Run context gen script as jupyter user#414

Merged
june-hua merged 3 commits into
masterfrom
june/fix-workbench-ai-context-gen
May 18, 2026
Merged

Run context gen script as jupyter user#414
june-hua merged 3 commits into
masterfrom
june/fix-workbench-ai-context-gen

Conversation

@june-hua
Copy link
Copy Markdown
Contributor

@june-hua june-hua commented May 18, 2026

The context gen script was failing because wb was not setup. The CLI is only setup for jupyter user, so run script as the user.

@june-hua june-hua self-assigned this May 18, 2026
@june-hua june-hua requested review from a team as code owners May 18, 2026 17:55
@june-hua june-hua requested a review from NavidZ May 18, 2026 18:44
@june-hua
Copy link
Copy Markdown
Contributor Author

Confirmed that fix works:
image

],
// re-mount bucket files on container start up, then generate LLM context
"postStartCommand": "./startupscript/remount-on-restart.sh jupyter /home/jupyter \"${templateOption:cloud}\" \"${templateOption:login}\"; /opt/llm-context/run-context-generator.sh /home/jupyter || true",
"postStartCommand": "./startupscript/remount-on-restart.sh jupyter /home/jupyter \"${templateOption:cloud}\" \"${templateOption:login}\"; sudo -u jupyter /opt/llm-context/run-context-generator.sh /home/jupyter || true",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to change the direction now. but more of a long term comment.
I think we should have added a dependency for that llm-feature on wb tools so devcontainer run/install that after wb tools so the wb is installed and also then in the ideal world have this generator run in the scripts within that feature and not here. So as an app author I would only need to include that feature in the "features" section and not additional commands here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the wb CLI dependency, workbench-tools feature does not install it. It gets installed in postCreateCommand post-startup.sh.
We might consider moving that to workbench-tools in the future.

I also see that the context generation script is run on each devcontainer startup, curious if it only needs to be once on creation.

@june-hua june-hua force-pushed the june/fix-workbench-ai-context-gen branch from 4afa5ab to 60a5be6 Compare May 18, 2026 20:56
@june-hua june-hua merged commit dd93621 into master May 18, 2026
3 checks passed
@june-hua june-hua deleted the june/fix-workbench-ai-context-gen branch May 18, 2026 20:57
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.

3 participants