- Stable Audio Open: AI audio generation on port 11500 (~6GB VRAM) - TRELLIS: 3D model generation on port 11510 (~6-8GB VRAM, low-VRAM fork) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
117 lines
3.9 KiB
YAML
117 lines
3.9 KiB
YAML
version: '3.8'
|
|
|
|
# TRELLIS 1 - 3D Model Generation (Low-VRAM Fork)
|
|
# Purpose: Generate 3D meshes with UV mappings for game asset pipeline
|
|
# Ports: 11510 (Gradio Web UI)
|
|
# GPU: YES - Optimized for 11GB VRAM (RTX 2080 Ti)
|
|
# Storage: SSD for model cache, HDD for GLB outputs
|
|
# Image: Built locally from /home/jpmschweitzer/docker-data/trellis/
|
|
|
|
services:
|
|
trellis:
|
|
image: trellis:local
|
|
container_name: trellis
|
|
restart: unless-stopped
|
|
ports:
|
|
- "11510:7860" # Gradio Web UI
|
|
volumes:
|
|
# SSD: HuggingFace model cache (~5GB)
|
|
- /home/jpmschweitzer/docker-data/trellis/hf-cache:/root/.cache/huggingface
|
|
# HDD: Generated GLB files
|
|
- /mnt/media/trellis/outputs:/app/outputs
|
|
# Entrypoint script (patches Gradio bugs without rebuilding image)
|
|
- /home/jpmschweitzer/docker-data/trellis/entrypoint.sh:/app/entrypoint.sh:ro
|
|
command: ["bash", "/app/entrypoint.sh"]
|
|
environment:
|
|
- TZ=Europe/Amsterdam
|
|
- NVIDIA_VISIBLE_DEVICES=all
|
|
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
|
|
# VRAM Optimization (for 11GB card)
|
|
- ATTN_BACKEND=xformers
|
|
- SPCONV_ALGO=native
|
|
- PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
|
|
# Gradio must bind to 0.0.0.0 inside Docker
|
|
- GRADIO_SERVER_NAME=0.0.0.0
|
|
# HuggingFace token for model downloads (set in Portainer)
|
|
- HF_TOKEN=${HF_TOKEN:-}
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "curl -fSs http://localhost:7860/ || exit 1"]
|
|
interval: 60s
|
|
timeout: 30s
|
|
retries: 3
|
|
start_period: 300s # Model download + load time
|
|
memswap_limit: 20G
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: 20G
|
|
reservations:
|
|
memory: 4G
|
|
devices:
|
|
- driver: nvidia
|
|
count: 1
|
|
capabilities: [gpu]
|
|
labels:
|
|
- "com.centurylinklabs.watchtower.enable=false" # Manual updates for local builds
|
|
networks:
|
|
- docker-dataplane
|
|
|
|
networks:
|
|
docker-dataplane:
|
|
external: true
|
|
name: docker-dataplane
|
|
|
|
# =============================================================================
|
|
# PREREQUISITES
|
|
# =============================================================================
|
|
#
|
|
# 1. Build the Docker image first:
|
|
# cd /home/jpmschweitzer/docker-data/trellis
|
|
# docker build -t trellis:local .
|
|
# (Takes ~20-30 minutes for CUDA compilation)
|
|
#
|
|
# 2. Directories are already created:
|
|
# /home/jpmschweitzer/docker-data/trellis/hf-cache (SSD - model cache)
|
|
# /mnt/media/trellis/outputs (HDD - generated GLB files)
|
|
#
|
|
# =============================================================================
|
|
# AFTER DEPLOYMENT
|
|
# =============================================================================
|
|
#
|
|
# 1. Verify GPU access:
|
|
# docker exec trellis nvidia-smi
|
|
#
|
|
# 2. Check logs:
|
|
# docker logs trellis
|
|
#
|
|
# 3. Access Web UI:
|
|
# http://tower-of-joy:11510
|
|
# http://192.168.86.149:11510
|
|
#
|
|
# 4. Monitor VRAM during generation:
|
|
# watch -n 1 nvidia-smi
|
|
#
|
|
# =============================================================================
|
|
# USAGE - GAME ASSET PIPELINE
|
|
# =============================================================================
|
|
#
|
|
# 1. Open Gradio UI at http://tower-of-joy:11510
|
|
# 2. Upload reference image or enter text prompt
|
|
# 3. Generate 3D model (uses 6-8GB VRAM)
|
|
# 4. Download GLB file from outputs
|
|
# 5. Import GLB into Blender (File > Import > glTF)
|
|
# 6. Apply custom textures, set up isometric camera
|
|
# 7. Render at 1024x1024, downsample to 64x64 tile sprites
|
|
#
|
|
# =============================================================================
|
|
# GPU CONTENTION NOTE
|
|
# =============================================================================
|
|
#
|
|
# TRELLIS shares the RTX 2080 Ti with Ollama and Jellyfin.
|
|
# For best results during complex generations:
|
|
# docker stop ollama
|
|
# # Run TRELLIS generation
|
|
# docker start ollama
|
|
#
|
|
# =============================================================================
|