build: optimize Dockerfiles for production
Some checks failed
Build and Push Images / build-rdna2 (push) Failing after 4m3s
Build and Push Images / build-nvidia (push) Failing after 4m6s
Build and Push Images / build-strixhalo (push) Failing after 18s
Build and Push Images / build-intel (push) Failing after 21s

- Use BuildKit syntax 1.7 with cache mounts for apt/uv
- Switch from pip to uv for 10-100x faster installs (ADR-0014)
- Add OCI Image Spec labels for container metadata
- Add HEALTHCHECK directives for orchestration
- Add .dockerignore to reduce context size
- Update Makefile with buildx and lint target
- Add retry logic to ray-entrypoint.sh

Refs: ADR-0012 (uv), ADR-0014 (Docker best practices)
This commit is contained in:
2026-02-02 07:26:27 -05:00
parent a16ffff73f
commit cb80709d3d
8 changed files with 443 additions and 232 deletions

44
.dockerignore Normal file
View File

@@ -0,0 +1,44 @@
# Git
.git
.gitignore
.gitea
# Documentation
*.md
LICENSE
docs/
# IDE and editors
.vscode/
.idea/
*.swp
*.swo
*~
# Python artifacts
__pycache__/
*.py[cod]
*$py.class
.pytest_cache/
.venv/
venv/
.env
*.egg-info/
dist/
build/
# OS files
.DS_Store
Thumbs.db
# Build logs
*.log
*.tmp
# Local development
Makefile
.goreleaser.yml
# Don't ignore these (explicitly include)
!ray-serve/
!dockerfiles/