You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .devcontainer/README.md
+50-15Lines changed: 50 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,8 @@ This directory contains the optimized dev container configuration for the Azure
15
15
16
16
## 🎯 Overview
17
17
18
+
This repository provides three prebuilt dev container configurations, one for each current Python version: 3.12, 3.13, and 3.14. When creating a new Codespace, select the variant you prefer — all variants are functionally equivalent for this project and differ only by Python runtime version.
19
+
18
20
The dev container uses a **three-stage optimization approach** to minimize startup time:
19
21
20
22
1.**Build Stage** (Dockerfile): Base system setup, Azure CLI configuration, and VS Code extension pre-installation
@@ -29,36 +31,60 @@ This approach ensures that time-consuming operations happen during container pre
29
31
30
32
| File | Purpose | Stage |
31
33
|------|---------|-------|
32
-
|`devcontainer.json`| Main dev container configuration | All |
All three are supported and prebuilt; choose the Python runtime that best matches your needs or local environment.
72
+
73
+
### ⚠️ About the "Default" Option
74
+
75
+
GitHub Codespaces will also display a generic **"Default"** dev container option. **Do not use this option** — it will result in:
76
+
- Significantly slower startup times (5-10 minutes vs. ~30 seconds)
77
+
- Missing tools, extensions, and optimizations
78
+
- Suboptimal development experience
79
+
80
+
**Always select one of the three Python-specific configurations above.** Unfortunately, GitHub does not currently provide a way to remove the default option from the Codespace creation dialog. This is a GitHub limitation, and we recommend always selecting one of the optimized Python variants.
81
+
56
82
## 🚀 Setup Stages
57
83
58
84
### Stage 1: Container Build (Dockerfile)
59
85
**When it runs**: During initial container build
60
86
**What it does**:
61
-
- Installs Python 3.12 and system dependencies
87
+
- Installs the selected Python version (3.12, 3.13, or 3.14) and system dependencies
62
88
- Configures Azure CLI for Codespaces (device code authentication)
@@ -187,6 +214,14 @@ Prebuild automatically occurs when you push changes to:
187
214
-`requirements.txt` (when referenced in `updateContentCommand`)
188
215
- Any other files referenced in lifecycle commands
189
216
217
+
### Caching Strategy
218
+
219
+
This project relies on GitHub Codespaces Prebuilds for fast startup and predictable environments:
220
+
221
+
- Main branch: Prebuilds are automatically triggered and cached when `.devcontainer/**` or `requirements.txt` changes. Opening a Codespace on main pulls the prebuilt image, typically starting in ~30 seconds.
222
+
- Feature branches: If prebuilds are not enabled, the first Codespace startup builds from the Dockerfile (usually a few minutes with the optimized images). Subsequent starts reuse Codespaces' transient cache.
223
+
- Registry images (optional): If you later need deterministic, versioned images across many branches or forks, you can publish images to GHCR and reference the tags directly in `devcontainer.json`. For now, prebuilds on main are sufficient.
224
+
190
225
### Monitoring Prebuild Status
191
226
192
227
You can monitor prebuild status in several ways:
@@ -249,16 +284,16 @@ To refresh the prebuilt container (recommended periodically):
249
284
250
285
## 🔧 Jupyter Kernel Configuration
251
286
252
-
The dev container is configured with a custom Jupyter kernel for optimal Python development experience:
287
+
The dev container is configured with a standardized Jupyter kernel for optimal Python development experience:
0 commit comments