Full music recommendation pipeline: listening history capture via webhook, Last.fm candidate discovery, iTunes preview download, CLAP audio embeddings (512-dim), pgvector cosine similarity recommendations, playlist generation with known/new track interleaving, and Music Assistant playback via HA. Includes: FastAPI app, SQLAlchemy models, Alembic migrations, Docker Compose with pgvector/pg17, status dashboard, and all API endpoints. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
29 lines
613 B
Docker
29 lines
613 B
Docker
FROM python:3.12-slim
|
|
|
|
# System deps for librosa/soundfile (ffmpeg for AAC decoding)
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
ffmpeg \
|
|
libsndfile1 \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
# Install Python deps
|
|
COPY pyproject.toml .
|
|
RUN pip install --no-cache-dir .
|
|
|
|
# Copy source
|
|
COPY alembic.ini .
|
|
COPY alembic/ alembic/
|
|
COPY src/ src/
|
|
|
|
# Install the project itself
|
|
RUN pip install --no-cache-dir -e .
|
|
|
|
# Create cache directories
|
|
RUN mkdir -p /app/model-cache /app/audio-cache
|
|
|
|
EXPOSE 8000
|
|
|
|
CMD ["uvicorn", "haunt_fm.main:app", "--host", "0.0.0.0", "--port", "8000"]
|