fix(docker): opt-in INSTALL_OPTIONAL build arg for AGPL extras (#2633)
Default image installs requirements.txt only. Set INSTALL_OPTIONAL=true at build time to add requirements-optional.txt (PyMuPDF, markitdown, etc.) without baking AGPL into the standard distributed image. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -22,9 +22,12 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install Python deps first (layer cache)
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
# Install Python deps first (layer cache). Optional extras (PyMuPDF AGPL, etc.)
|
||||
# are opt-in so the default image stays MIT-core; see requirements-optional.txt.
|
||||
ARG INSTALL_OPTIONAL=false
|
||||
COPY requirements.txt requirements-optional.txt ./
|
||||
RUN pip install --no-cache-dir -r requirements.txt \
|
||||
&& if [ "$INSTALL_OPTIONAL" = "true" ]; then pip install --no-cache-dir -r requirements-optional.txt; fi
|
||||
|
||||
# Copy app code
|
||||
COPY . .
|
||||
|
||||
Reference in New Issue
Block a user