fix(docker): create /opt/models unconditionally so chown works in CI

When SKIP_MODEL_DOWNLOADS=true the download script never runs, so
/opt/models was never created and the subsequent chown -R ... /opt/models
failed with exit code 1.  mkdir -p it alongside the other required dirs.
This commit is contained in:
Siddharth Kumar Sah 2026-04-16 08:55:39 +08:00
parent 6a3ad0d496
commit 93ce2891cc

View file

@ -252,8 +252,9 @@ COPY packages/ai/python ./packages/ai/python
# Copy built frontend from builder stage
COPY --from=builder /app/apps/web/dist ./apps/web/dist
# Create required directories
RUN mkdir -p /data /data/files /tmp/workspace
# Create required directories (including /opt/models so chown works even when
# SKIP_MODEL_DOWNLOADS=true skips the download script that would create it)
RUN mkdir -p /data /data/files /tmp/workspace /opt/models
# Symlink facexlib models for codeformer-pip (expects gfpgan/weights/ relative to CWD)
RUN mkdir -p /app/gfpgan/weights/CodeFormer && \