Replace start-gpu.sh with install-local-gpu.sh + bring-up-local-gpu.sh
install-local-gpu.sh (run once): - Installs nvidia-container-toolkit (Ubuntu/Debian/RHEL auto-detected) - Installs docker-dns-fix.service systemd unit: permanent iptables DNS fix that runs after docker.service on every boot, without touching ufw - Restarts Docker and applies the rule immediately - Verifies GPU is accessible inside Docker bring-up-local-gpu.sh (run each time): - Thin wrapper: docker compose -f docker-compose.gpu.yml up -d --build - Accepts pass-through args (down, logs -f, --no-build, etc.) - BUILDID=$(date +%s) ./bring-up-local-gpu.sh for pip cache bust README Quick Start, Updates, and Troubleshooting updated accordingly. https://claude.ai/code/session_01WVDg7amsy1TTtxvpku7bcM
This commit is contained in:
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
# bring-up-local-gpu.sh — start the GPU container.
|
||||
#
|
||||
# Run this each time you want to start the app.
|
||||
# Run ./install-local-gpu.sh once first on a new machine.
|
||||
#
|
||||
# Usage:
|
||||
# ./bring-up-local-gpu.sh # start (detached, rebuild if needed)
|
||||
# ./bring-up-local-gpu.sh --no-build # start without rebuilding
|
||||
# ./bring-up-local-gpu.sh down # stop and remove container
|
||||
# ./bring-up-local-gpu.sh logs -f # tail logs
|
||||
#
|
||||
# Force pip layer rebuild (e.g. after requirements change):
|
||||
# BUILDID=$(date +%s) ./bring-up-local-gpu.sh
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
exec docker compose -f docker-compose.gpu.yml up -d --build
|
||||
else
|
||||
exec docker compose -f docker-compose.gpu.yml "$@"
|
||||
fi
|
||||
Reference in New Issue
Block a user