diff --git a/Dockerfile b/Dockerfile index 72f0715..0e9bc09 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,10 +12,14 @@ RUN pip install --no-cache-dir -r requirements.txt # Copy application COPY . . +# Clone effects repo +RUN git clone https://git.rose-ash.com/art-dag/effects.git /app/artdag-effects + # Create cache directory RUN mkdir -p /data/cache ENV PYTHONUNBUFFERED=1 +ENV EFFECTS_PATH=/app/artdag-effects # Default command runs the server CMD ["python", "server.py"] diff --git a/tasks.py b/tasks.py index 178be84..0041aae 100644 --- a/tasks.py +++ b/tasks.py @@ -6,6 +6,7 @@ Distributed rendering tasks for the Art DAG system. import hashlib import json +import os import sys from datetime import datetime, timezone from pathlib import Path @@ -13,8 +14,8 @@ from pathlib import Path from celery import Task from celery_app import app -# Add effects to path -EFFECTS_PATH = Path.home() / "artdag-effects" +# Add effects to path (use env var in Docker, fallback to home dir locally) +EFFECTS_PATH = Path(os.environ.get("EFFECTS_PATH", str(Path.home() / "artdag-effects"))) sys.path.insert(0, str(EFFECTS_PATH / "dog"))