-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add minimal dev container configuration
We would probably want something more fully featured than this, but this is a start with VSCode's configuration tool, and some manually added extensions. For more, we could use a Dockerfile or Docker Compose file that we provide.
- Loading branch information
1 parent
6f5d388
commit af3e3a3
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,48 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. For config options, see the | ||
// README at: https://github.com/devcontainers/templates/tree/main/src/python | ||
{ | ||
"name": "Python 3", | ||
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile | ||
// 2023-06-29: Use bullseye image instead of bookworm. | ||
// At time of writing, bookworm is new and may have issues with dev containers: | ||
// https://github.com/devcontainers/features/issues/576 | ||
"image": "mcr.microsoft.com/devcontainers/python:3.11-bullseye", | ||
|
||
// Features to add to the dev container. More info: https://containers.dev/features. | ||
"features": { | ||
// TODO: Not sure if we would be better installing tools via requirements.txt. | ||
"ghcr.io/devcontainers/features/python:1": { | ||
"installTools": true, | ||
"installJupyterlab": true, | ||
// https://github.com/devcontainers/features/issues/598#issuecomment-1612216163 | ||
"version": "none" | ||
}, | ||
"ghcr.io/devcontainers/features/docker-in-docker:2": { | ||
"moby": true, | ||
"azureDnsAutoDetection": true, | ||
"installDockerBuildx": true, | ||
"version": "latest", | ||
"dockerDashComposeVersion": "v2" | ||
} | ||
}, | ||
|
||
// Use 'forwardPorts' to make a list of ports inside the container available locally. | ||
// "forwardPorts": [], | ||
|
||
// Use 'postCreateCommand' to run commands after the container is created. | ||
"postCreateCommand": "pip3 install --user -r requirements.txt", | ||
|
||
// Configure tool-specific properties. | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.python", | ||
"ms-toolsai.jupyter", | ||
"ms-toolsai.jupyter-renderers" | ||
] | ||
} | ||
} | ||
|
||
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. | ||
// "remoteUser": "root" | ||
} |