Skip to content

Commit a76a0f5

Browse files
committed
fix: add libhdf5-dev for PyTables; harden pip install against missing packages
- Dockerfile: add libhdf5-dev to apt packages (required by the 'tables' PyTables package to compile its C extension) - on-create.sh: bulk uv pip install now falls back to per-package install if any package fails (e.g. lsp/json-lsp/yaml-lsp may not resolve on PyPI); failed packages are logged but don't abort the prebuild https://claude.ai/code/session_012Q7LNdgiAXGciBxMnK4aZB
1 parent fe0b05e commit a76a0f5

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.devcontainer/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
3636
libxcomposite1 \
3737
libxdamage1 \
3838
libxrandr2 \
39+
libhdf5-dev \
3940
nano \
4041
nodejs \
4142
npm \

.devcontainer/on-create.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,20 @@ source .venv/bin/activate
1818

1919
# ── Python dependencies ────────────────────────────────────────────────────
2020
echo "==> [on-create] Installing Python dependencies"
21-
uv pip install --no-cache-dir -r .binder/requirements.txt
21+
# Try bulk install first; fall back to per-package so one bad name doesn't
22+
# abort the entire install (e.g. lsp/json-lsp/yaml-lsp may not exist on PyPI).
23+
if ! uv pip install --no-cache-dir -r .binder/requirements.txt; then
24+
echo "WARNING: bulk install failed – retrying package by package"
25+
failed=()
26+
while IFS= read -r pkg; do
27+
[[ -z "$pkg" || "$pkg" =~ ^# ]] && continue
28+
uv pip install --no-cache-dir "$pkg" || failed+=("$pkg")
29+
done < .binder/requirements.txt
30+
if [ ${#failed[@]} -gt 0 ]; then
31+
echo "WARNING: the following packages could not be installed:"
32+
printf ' - %s\n' "${failed[@]}"
33+
fi
34+
fi
2235

2336
# Register the venv kernel so JupyterLab can find it
2437
python -m ipykernel install --user --name iceberg-ml --display-name "Python 3 (Iceberg ML)"

0 commit comments

Comments
 (0)