diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index c24c0fe..9f449d2 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,8 +1,8 @@ { "name": "DS Development Container", - "image": "mcr.microsoft.com/devcontainers/base:ubuntu", + "image": "mcr.microsoft.com/devcontainers/base:debian", "features": { - "ghcr.io/devcontainers/features/cmake:1": { + "ghcr.io/devcontainers-extra/features/cmake:1": { "version": "latest" }, "ghcr.io/devcontainers/features/python:1": { @@ -10,6 +10,12 @@ }, "ghcr.io/devcontainers/features/node:1": { "version": "latest" + }, + "ghcr.io/gvatsal60/dev-container-features/uv:0": { + "version": "latest" + }, + "ghcr.io/ebaskoro/devcontainer-features/emscripten:1": { + "version": "latest" } }, "postCreateCommand": ".devcontainer/post-create.sh", diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh index 2ca803c..1aa234c 100755 --- a/.devcontainer/post-create.sh +++ b/.devcontainer/post-create.sh @@ -5,34 +5,11 @@ set -euo pipefail sudo apt-get update sudo apt-get install -y libgtest-dev clang-format -# Install uv (Python package manager) -curl -LsSf https://astral.sh/uv/install.sh | sh - -# Add uv to PATH for this script and future sessions -export PATH="$HOME/.local/bin:$PATH" -echo 'export PATH="$HOME/.local/bin:$PATH"' >> "$HOME/.bashrc" - -# Install Python dependencies +# Install Python dependencies (uv is installed via devcontainer feature) uv sync --locked --extra dev # Install Node.js dependencies npm ci -# Install emscripten to a persistent location -EMSDK_DIR="$HOME/emsdk" -if [ ! -d "$EMSDK_DIR" ]; then - git clone https://github.com/emscripten-core/emsdk.git "$EMSDK_DIR" -else - git -C "$EMSDK_DIR" pull -fi -( - cd "$EMSDK_DIR" - ./emsdk install latest - ./emsdk activate latest -) - -# Add emsdk to shell config for future sessions -echo "source $EMSDK_DIR/emsdk_env.sh" >> "$HOME/.bashrc" - # Install pre-commit hooks uv run pre-commit install