Skip to content

Commit

Permalink
Add DevContainer setup for Python and Jupyter kernel support
Browse files Browse the repository at this point in the history
  • Loading branch information
CJavierSaldana authored and jonsequitur committed Aug 21, 2024
1 parent 6c253c3 commit 688ef55
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion docs/jupyter-in-polyglot-notebooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,20 @@ Or, you can get similar experience by adding `condaenvpython3.9` as a kernel spe

```
#!connect jupyter --kernel-name pythonkernel --conda-env base --kernel-spec condaenvpython3.9
```
```

## Using DevContainers

The default Python3 configuration does not include the kernel, so you need to modify the devcontainer.json file to use a Dockerfile:

```
FROM mcr.microsoft.com/devcontainers/dotnet:1-8.0
RUN apt update
RUN apt install -y python3 python3-pip python3-ipykernel
```

After loading the DevContainer, run the following command in a cell:
```
#!connect jupyter --kernel-name pythonkernel --conda-env base --kernel-spec python3
```

0 comments on commit 688ef55

Please sign in to comment.