# Shorashim Talmudic Engine — SWI-Prolog dialectical reasoning # Construction spec §1.1: SWI-Prolog 9.2.2 # Communicates with vav_pipeline via Unix domain socket # # PLATFORM PIN: see Dockerfile.vav_pipeline for the rationale. # Exoscale SKS = amd64; arm64 images cannot exec on the cluster. # === BUILD STAGE === FROM --platform=linux/amd64 swipl:9.2.2 AS build WORKDIR /app COPY talmudic_engine/ ./ # Verify Prolog loads without errors RUN swipl -g "consult('src/main'),halt(0)" -t "halt(1)" # === RUNTIME STAGE === FROM --platform=linux/amd64 swipl:9.2.2 RUN useradd --create-home --shell /bin/bash shorashim USER shorashim WORKDIR /home/shorashim/talmudic_engine COPY --from=build --chown=shorashim:shorashim /app/ ./ # L1 Torah filesystem — baked into the image COPY --chown=shorashim:shorashim l1/ /mnt/torah/ # L1 mount point ENV L1_MOUNT_POINT=/mnt/torah # Socket path for communication with vav_pipeline ENV TALMUDIC_SOCKET_PATH=/tmp/shorashim/talmudic.sock # Start the Prolog socket server CMD ["swipl", "-g", "consult('src/main'),start_socket_server", "-t", "halt(1)"]