feat: clone effects repo in Docker, use EFFECTS_PATH env var
This commit is contained in:
@@ -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"]
|
||||
|
||||
5
tasks.py
5
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"))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user