Skip to content

Commit 80dfa55

Browse files
big kernel changes
1 parent 94a0672 commit 80dfa55

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@
113113
"onCreateCommand": [
114114
"bash",
115115
"-c",
116-
"echo '🚀 Creating Python virtual environment in workspace...' && /usr/local/bin/python3.12 -m venv /workspaces/Apim-Samples/.venv --copies && source /workspaces/Apim-Samples/.venv/bin/activate && pip install --upgrade pip setuptools wheel && echo '✅ Virtual environment created'"
116+
"echo '🚀 Creating Python virtual environment in workspace...' && /usr/local/bin/python3.12 -m venv /workspaces/Apim-Samples/.venv --copies && source /workspaces/Apim-Samples/.venv/bin/activate && pip install --upgrade pip setuptools wheel ipykernel && echo '✅ Virtual environment created' && echo '🔧 Registering Jupyter kernel during prebuild...' && python -m ipykernel install --user --name=apim-samples --display-name='APIM Samples Python 3.12' --python=\"$(which python)\" && echo '🧹 Removing default python3 kernel...' && rm -rf /workspaces/Apim-Samples/.venv/share/jupyter/kernels/python3 2>/dev/null || true && echo '✅ Jupyter kernel registered in prebuild'"
117117
],
118118
"updateContentCommand": [
119119
"bash",
120120
"-c",
121-
"echo '📦 Installing/updating Python packages from requirements.txt...' && source /workspaces/Apim-Samples/.venv/bin/activate && pip install -r requirements.txt && pip install pytest pytest-cov coverage ipykernel && echo '✅ Python packages installed/updated' && python setup/setup_python_path.py --generate-env && echo '✅ Environment configuration updated' && echo '🔧 Registering Jupyter kernel...' && python -m ipykernel install --user --name=apim-samples --display-name='APIM Samples Python 3.12' --python=\"$(which python)\" && echo '✅ Jupyter kernel registered' && echo '⚙️ Configuring Azure CLI...' && az config set core.login_experience_v2=off 2>/dev/null || true && az extension add --name containerapp --only-show-errors 2>/dev/null || true && az extension add --name front-door --only-show-errors 2>/dev/null || true && echo '✅ Azure CLI configured for Codespaces'"
121+
"echo '📦 Installing/updating Python packages from requirements.txt...' && source /workspaces/Apim-Samples/.venv/bin/activate && pip install -r requirements.txt && pip install pytest pytest-cov coverage && echo '✅ Python packages installed/updated' && python setup/setup_python_path.py --generate-env && echo '✅ Environment configuration updated' && echo '⚙️ Configuring Azure CLI...' && az config set core.login_experience_v2=off 2>/dev/null || true && az extension add --name containerapp --only-show-errors 2>/dev/null || true && az extension add --name front-door --only-show-errors 2>/dev/null || true && echo '✅ Azure CLI configured for Codespaces'"
122122
],
123123
"postStartCommand": [
124124
"bash",

.devcontainer/post-start-setup-2.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,9 @@ fi
5252

5353
# Quick Jupyter kernel check
5454
if jupyter kernelspec list 2>/dev/null | grep -q "apim-samples"; then
55-
echo " ✅ Jupyter kernel"
55+
echo " ✅ Jupyter kernel (prebuild)"
5656
else
57-
echo " ⚠️ Jupyter kernel missing (fallback registration...)"
58-
python -m ipykernel install --user --name=apim-samples --display-name="APIM Samples Python 3.12" >/dev/null 2>&1
59-
echo " ✅ Jupyter kernel registered"
57+
echo " ⚠️ Jupyter kernel missing - check prebuild logs"
6058
fi
6159

6260
# Calculate total duration

0 commit comments

Comments
 (0)