feat: centralize L402 config, automate Metal install, fix watchdog cleanup
- config.py: add L402_HMAC_SECRET, L402_MACAROON_SECRET, LIGHTNING_BACKEND to pydantic-settings with startup warnings for default secrets - l402_proxy.py, mock_backend.py, factory.py: migrate from os.environ.get() to `from config import settings` per project convention - Makefile: `make install-creative` now auto-installs PyTorch nightly with Metal (MPS) support on Apple Silicon instead of just printing a note - activate_self_tdd.sh: add PID file (.watchdog.pid) and EXIT trap so Ctrl-C cleanly stops both the dashboard and the watchdog process - .gitignore: add .watchdog.pid https://claude.ai/code/session_01A81E5HMxZEPxzv2acNo35u
This commit is contained in:
14
Makefile
14
Makefile
@@ -27,14 +27,14 @@ install-bigbrain: $(VENV)/bin/activate
|
||||
|
||||
install-creative: $(VENV)/bin/activate
|
||||
$(PIP) install --quiet -e ".[dev,creative]"
|
||||
@if [ "$$(uname -s)" = "Darwin" ]; then \
|
||||
echo ""; \
|
||||
echo " Note: PyTorch on macOS uses CPU by default."; \
|
||||
echo " For Metal (GPU) acceleration, install the nightly build:"; \
|
||||
echo " pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cpu"; \
|
||||
echo ""; \
|
||||
@if [ "$$(uname -m)" = "arm64" ] && [ "$$(uname -s)" = "Darwin" ]; then \
|
||||
echo " Apple Silicon detected — installing PyTorch with Metal (MPS) support..."; \
|
||||
$(PIP) install --quiet --pre torch torchvision torchaudio \
|
||||
--index-url https://download.pytorch.org/whl/nightly/cpu; \
|
||||
echo "✓ Creative extras installed with Metal GPU acceleration"; \
|
||||
else \
|
||||
echo "✓ Creative extras installed (diffusers, torch, ace-step)"; \
|
||||
fi
|
||||
@echo "✓ Creative extras installed (diffusers, torch, ace-step)"
|
||||
|
||||
$(VENV)/bin/activate:
|
||||
python3 -m venv $(VENV)
|
||||
|
||||
Reference in New Issue
Block a user