Created
May 31, 2025 21:42
-
-
Save darinkishore/e8549f327c60f618fc1e9bf54c4565ee to your computer and use it in GitHub Desktop.
GPU Dev Environment Quick Setup - Master script that orchestrates complete development environment setup including tools, shells, and configurations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Master setup script that orchestrates the complete dev environment setup | |
# This runs all setup scripts in the correct order | |
set -e | |
echo "π GPU Dev Environment Quick Setup" | |
echo "==================================" | |
echo "" | |
# Colors for output | |
GREEN='\033[0;32m' | |
YELLOW='\033[1;33m' | |
NC='\033[0m' # No Color | |
# Step 1: Run container setup (requires sudo) | |
echo -e "${YELLOW}Step 1: Installing all development tools...${NC}" | |
echo "This will install packages, create developer user, and set up tools." | |
echo "You'll need sudo access for this step." | |
echo "" | |
read -p "Continue? (y/n) " -n 1 -r | |
echo "" | |
if [[ $REPLY =~ ^[Yy]$ ]]; then | |
curl -fsSL https://gist.githubusercontent.com/darinkishore/cba73a811392ba6cc5f1ed75f4048b7c/raw | sudo bash | |
echo -e "${GREEN}β Base setup complete!${NC}" | |
else | |
echo "Setup cancelled." | |
exit 1 | |
fi | |
# Step 2: Switch to developer user and continue setup | |
echo "" | |
echo -e "${YELLOW}Step 2: Switching to developer user for remaining setup...${NC}" | |
echo "" | |
# Create a continuation script for the developer user | |
cat << 'DEVSCRIPT' > /tmp/continue-setup.sh | |
#!/bin/bash | |
set -e | |
GREEN='\033[0;32m' | |
YELLOW='\033[1;33m' | |
NC='\033[0m' | |
# Download and run environment check | |
echo -e "${YELLOW}Checking environment...${NC}" | |
curl -fsSL https://gist.githubusercontent.com/darinkishore/ae380a963b96a80edf83c631ce2c8fb6/raw -o ~/.local/bin/setup-env.sh | |
chmod +x ~/.local/bin/setup-env.sh | |
~/.local/bin/setup-env.sh | |
# Download GitHub auth helper | |
echo "" | |
echo -e "${YELLOW}Downloading GitHub authentication helper...${NC}" | |
curl -fsSL https://gist.githubusercontent.com/darinkishore/cfe2ae03d7bdd79258b2254cc5ae6f37/raw -o ~/.local/bin/gh-auth.sh | |
chmod +x ~/.local/bin/gh-auth.sh | |
# Ask about GitHub authentication | |
echo "" | |
echo -e "${YELLOW}Step 3: GitHub Authentication (Optional)${NC}" | |
echo "Would you like to authenticate with GitHub now?" | |
echo "This is needed for cloning private repos and using gh CLI." | |
read -p "Authenticate with GitHub? (y/n) " -n 1 -r | |
echo "" | |
if [[ $REPLY =~ ^[Yy]$ ]]; then | |
~/.local/bin/gh-auth.sh | |
fi | |
echo "" | |
echo -e "${GREEN}π Setup Complete!${NC}" | |
echo "" | |
echo "Your development environment is ready with:" | |
echo " β’ Fish shell with plugins" | |
echo " β’ Helix editor" | |
echo " β’ Development tools (ripgrep, fd, etc.)" | |
echo " β’ Node.js 22 and npm" | |
echo " β’ Python with uv package manager" | |
echo " β’ Claude Code CLI" | |
echo "" | |
echo "Next steps:" | |
echo " β’ Your workspace is at ~/workspace" | |
echo " β’ Use 'mise' to manage language versions" | |
echo " β’ Use 'uv' for fast Python package installs" | |
echo " β’ Run 'gh-auth.sh' anytime to setup GitHub" | |
echo "" | |
echo "Enjoy your GPU development environment! π" | |
DEVSCRIPT | |
chmod +x /tmp/continue-setup.sh | |
# Execute as developer user | |
echo "Continuing setup as developer user..." | |
su - developer -c "/tmp/continue-setup.sh" | |
# Cleanup | |
rm -f /tmp/continue-setup.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment