Skip to content

Latest commit

 

History

History
66 lines (47 loc) · 1.94 KB

File metadata and controls

66 lines (47 loc) · 1.94 KB

Contributing

How to use, on a Windows machine by installing WSL

  1. Windows pre-reqs

    winget install -e --id Microsoft.VisualStudioCode
  2. Get a fresh new WSL machine up:

    ⚠️ Warning: this removes Docker Desktop if you have it installed

    $GIT_ROOT = git rev-parse --show-toplevel
    & "$GIT_ROOT\contrib\bootstrap-dev-env.ps1"
  3. Clone the repo, and open VSCode in it:

    ⚠️ Important: We use WSL in ~/ because Linux > Windows drive commits via /mnt/c is extremely slow for Spark I/O. You can technically run the Devcontainer using Windows Docker Desktop, but the I/O experience is slow and poor.

    echo "$USER ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/$USER >/dev/null && sudo chmod 440 /etc/sudoers.d/$USER
    sudo mkdir -p /workspaces
    sudo chmod 777 /workspaces
    
    cd /workspaces
    
    read -p "Enter your name (e.g. 'FirstName LastName'): " user_name
    read -p "Enter your GitHub email (e.g. 'your-email@blah.com'): " user_email
    read -p "Enter the branch to switch to: (e.g. 'main') " branch_name
    
    git clone https://github.com/mdrakiburrahman/spark-sandbox.git
    
    git config --global user.name "$user_name"
    git config --global user.email "$user_email"
    cd /workspaces/spark-sandbox/
    git pull origin
    git checkout "$branch_name"
    code .
  4. Run the bootstrapper script, that installs all tools idempotently:

    GIT_ROOT=$(git rev-parse --show-toplevel)
    chmod +x ${GIT_ROOT}/contrib/bootstrap-dev-env.sh && ${GIT_ROOT}/contrib/bootstrap-dev-env.sh
  5. Launch devcontainer:

    cd /workspaces/spark-sandbox
    HEX=$(printf '%s' "$(wslpath -w .)" | xxd -ps -c 256)
    code --folder-uri "vscode-remote://dev-container+${HEX}/workspaces/spark-sandbox"
  6. Install recommended developer tooling (optional):

    curl -fsSL https://gh.io/copilot-install | bash
    $HOME/.local/bin/copilot --yolo