-
Notifications
You must be signed in to change notification settings - Fork 17
[DO NOT MERGE] Testing a jupyter app with docker daemon mounted #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 2 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
90b5127
Testing jupyter app with mounted docker socket
rogerwangcs d4be65f
add docker socket mount tweak
rogerwangcs c8eda68
enable non sudo docker, mount docker config directory
rogerwangcs 487ecd6
tweaks
rogerwangcs 6b87e3f
set executable bit
rogerwangcs 97a893e
fix
rogerwangcs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| { | ||
| "name": "Workbench JupyterLab with docker support devcontainer template", | ||
| "dockerComposeFile": "docker-compose.yaml", | ||
| "service": "app", | ||
| "shutdownAction": "none", | ||
| "workspaceFolder": "/workspace", | ||
| "postCreateCommand": [ | ||
| "./startupscript/post-startup.sh", | ||
| "jupyter", | ||
| "/home/jupyter", | ||
| "${templateOption:cloud}", | ||
| "${templateOption:login}" | ||
| ], | ||
| // re-mount bucket files on container start up | ||
| "postStartCommand": [ | ||
| "./startupscript/remount-on-restart.sh", | ||
| "jupyter", | ||
| "/home/jupyter", | ||
| "${templateOption:cloud}", | ||
| "${templateOption:login}" | ||
| ], | ||
| "remoteUser": "root", | ||
| "customizations": { | ||
| "workbench": { | ||
| "opens": { | ||
| "extensions": [ | ||
| // Source | ||
| ".ipynb", | ||
| ".R", | ||
| ".py", | ||
| // Documents | ||
| ".md", | ||
| ".html", | ||
| ".latex", | ||
| ".pdf", | ||
| // Images | ||
| ".bmp", | ||
| ".gif", | ||
| ".jpeg", | ||
| ".jpg", | ||
| ".png", | ||
| ".svg", | ||
| // Data | ||
| ".csv", | ||
| ".tsv", | ||
| ".json", | ||
| ".vl" | ||
| ], | ||
| "fileUrlSuffix": "/lab/tree/{path}", | ||
| "folderUrlSuffix": "/lab/tree/{path}" | ||
| } | ||
| } | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
|
|
||
| # Custom Workbench JupyterLab App Template (workbench-jupyter-docker) | ||
|
|
||
| A template used to serve the Workbench custom JupyterLab app. | ||
|
|
||
| ## Options | ||
|
|
||
| | Options Id | Description | Type | Default Value | | ||
| |-----|-----|-----|-----| | ||
| | cloud | VM cloud environment | string | gcp | | ||
| | login | Whether to log in to workbench CLI | string | false | | ||
|
|
||
|
|
||
|
|
||
| --- | ||
|
|
||
| _Note: This file was auto-generated from the [devcontainer-template.json](devcontainer-template.json). Add additional notes to a `NOTES.md`._ |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "id": "custom-workbench-jupyter-template", | ||
| "description": "A template used to serve the Workbench JupyterLab container image", | ||
| "version": "0.0.1", | ||
| "name": "Workbench Prebuilt JupyterLab Template", | ||
| "documentationURL": "https://github.com/verily-src/workbench-app-devcontainers/tree/master/src/custom-workbench-jupyter-template", | ||
| "licenseURL": "https://github.com/verily-src/workbench-app-devcontainers/blob/master/LICENSE", | ||
| "options": { | ||
| "cloud": { | ||
| "type": "string", | ||
| "description": "VM cloud environment", | ||
| "proposals": ["gcp", "aws"], | ||
| "default": "gcp" | ||
| }, | ||
| "login": { | ||
| "type": "string", | ||
| "description": "Whether to log in to workbench CLI", | ||
| "proposals": ["true", "false"], | ||
| "default": "false" | ||
| } | ||
| }, | ||
| "platforms": ["Any"] | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| version: "2.4" | ||
| services: | ||
| app: | ||
| container_name: "application-server" | ||
| image: "us-central1-docker.pkg.dev/verily-workbench-public/apps/workbench-jupyter:latest" | ||
| user: "jupyter" | ||
| restart: always | ||
| volumes: | ||
| - .:/workspace:cached | ||
| # Mount docker socket so application can access the docker daemon in the host | ||
| - /var/run/docker.sock:/var/run/docker.sock | ||
| ports: | ||
| - "8888:8888" | ||
| networks: | ||
| - app-network | ||
| cap_add: | ||
| - SYS_ADMIN | ||
| devices: | ||
| - /dev/fuse | ||
| security_opt: | ||
| - apparmor:unconfined | ||
| networks: | ||
| app-network: | ||
| external: true | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is the snipped added to for docker to work. We still must install
dockerin the app to access the mounted daemon though.