Add reusable GIS run mode and AI runtime opt-in
This commit is contained in:
@@ -8,6 +8,8 @@ RUN npm run build
|
||||
|
||||
FROM postgres:16-bookworm AS runtime
|
||||
|
||||
ARG GEOINTEL_INSTALL_AI=false
|
||||
|
||||
ENV GEOINTEL_ENV=production \
|
||||
GEOINTEL_API_PREFIX=/api/v1 \
|
||||
GEOINTEL_STORAGE_ROOT=/app/storage \
|
||||
@@ -43,8 +45,11 @@ COPY --from=frontend-build /frontend/dist/ /usr/share/nginx/html/
|
||||
|
||||
RUN /usr/bin/python3.11 -m venv /opt/geointel/venv \
|
||||
&& pip install --no-cache-dir --upgrade pip setuptools \
|
||||
&& pip install --no-cache-dir ".[gis]" \
|
||||
&& extras=".[gis]" \
|
||||
&& if [ "$GEOINTEL_INSTALL_AI" = "true" ]; then extras=".[gis,ai]"; fi \
|
||||
&& pip install --no-cache-dir "$extras" \
|
||||
&& python scripts/gis_import_smoke.py \
|
||||
&& python scripts/yolo_preflight.py --json >/tmp/geointel-yolo-preflight.json \
|
||||
&& chmod +x /usr/local/bin/geointel-all-in-one-start \
|
||||
&& rm -f /etc/nginx/sites-enabled/default \
|
||||
&& mkdir -p /app/storage /run/nginx /var/log/nginx
|
||||
|
||||
Reference in New Issue
Block a user