feat/youtube-growth-toolkit #8

Merged
pedro-bento merged 10 commits from feat/youtube-growth-toolkit into main 2026-10-05 20:33:57 +01:00
3 changed files with 22 additions and 0 deletions
Showing only changes of commit 6aa3b0ec82 - Show all commits

1
.gitignore vendored
View file

@ -30,6 +30,7 @@ output/
# Cache dirs # Cache dirs
.cache/ .cache/
.config/ .config/
.fontconfig/
.pytest_cache/ .pytest_cache/
.ruff_cache/ .ruff_cache/

View file

@ -71,6 +71,18 @@ COPY --from=builder /opt/venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH" ENV PATH="/opt/venv/bin:$PATH"
ENV PYTHONUNBUFFERED=1 ENV PYTHONUNBUFFERED=1
# Runtime caches must not land inside the bind-mounted source tree. Compose
# mounts the host repo at /app, and the container's non-root appuser cannot
# write there, so matplotlib/fontconfig logged permission errors and dropped a
# stray .fontconfig (owned by the container's uid) into the repo. Point HOME
# and the disposable caches at writable /tmp; keep the ASR model cache on the
# named volume mounted at HF_HOME (see docker-compose.yml) so it survives
# container recreates.
ENV HOME=/tmp \
MPLCONFIGDIR=/tmp/.cache/matplotlib \
YOLO_CONFIG_DIR=/tmp/Ultralytics \
HF_HOME=/app/.cache/huggingface
# GPU runtime wiring — harmless no-ops on CPU builds / hosts without the # GPU runtime wiring — harmless no-ops on CPU builds / hosts without the
# NVIDIA runtime. LD_LIBRARY_PATH points at the pip-installed CUDA libs # NVIDIA runtime. LD_LIBRARY_PATH points at the pip-installed CUDA libs
# (paths simply don't exist in CPU images); DRIVER_CAPABILITIES asks the # (paths simply don't exist in CPU images); DRIVER_CAPABILITIES asks the

View file

@ -8,6 +8,12 @@ services:
- .:/app - .:/app
- /app/__pycache__ - /app/__pycache__
- ./output:/app/output - ./output:/app/output
# Persistent, writable cache for the ASR model downloads. Without this the
# bind mount above shadows /app/.cache with a host-owned dir the non-root
# appuser cannot write (HF cache permission-denied warnings). The named
# volume is initialised from the image's appuser-owned dir, so it stays
# writable and the model survives container recreates.
- huggingface-cache:/app/.cache/huggingface
restart: unless-stopped restart: unless-stopped
frontend: frontend:
@ -29,3 +35,6 @@ services:
restart: unless-stopped restart: unless-stopped
depends_on: depends_on:
- backend - backend
volumes:
huggingface-cache: