mirror of
https://github.com/NVIDIA/dgx-spark-playbooks.git
synced 2026-04-26 20:03:52 +00:00
Add Docker permission validation
This commit is contained in:
parent
07d4107da4
commit
eec479197b
@ -88,7 +88,7 @@ services:
|
|||||||
count: all
|
count: all
|
||||||
capabilities: [gpu]
|
capabilities: [gpu]
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:11434/api/tags"]
|
test: ["CMD", "ollama", "list"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|||||||
@ -78,6 +78,32 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Check Docker daemon permissions
|
||||||
|
echo "Checking Docker permissions..."
|
||||||
|
if ! docker info &> /dev/null; then
|
||||||
|
echo ""
|
||||||
|
echo "=========================================="
|
||||||
|
echo "ERROR: Docker Permission Denied"
|
||||||
|
echo "=========================================="
|
||||||
|
echo ""
|
||||||
|
echo "You don't have permission to connect to the Docker daemon."
|
||||||
|
echo ""
|
||||||
|
echo "To fix this, run one of the following:"
|
||||||
|
echo ""
|
||||||
|
echo "Option 1 (Recommended): Add your user to the docker group"
|
||||||
|
echo " sudo usermod -aG docker \$USER"
|
||||||
|
echo " newgrp docker"
|
||||||
|
echo ""
|
||||||
|
echo "Option 2: Run this script with sudo (not recommended)"
|
||||||
|
echo " sudo ./start.sh"
|
||||||
|
echo ""
|
||||||
|
echo "After adding yourself to the docker group, you may need to log out"
|
||||||
|
echo "and log back in for the changes to take effect."
|
||||||
|
echo ""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "✓ Docker permissions OK"
|
||||||
|
|
||||||
# Build the docker-compose command
|
# Build the docker-compose command
|
||||||
if [ "$USE_COMPLETE" = true ]; then
|
if [ "$USE_COMPLETE" = true ]; then
|
||||||
CMD="$DOCKER_COMPOSE_CMD -f $(pwd)/deploy/compose/docker-compose.complete.yml"
|
CMD="$DOCKER_COMPOSE_CMD -f $(pwd)/deploy/compose/docker-compose.complete.yml"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user