ARG DRONE_COMMIT="latest"
FROM quratorspk/ocrd-galley-core-cuda10.0:$DRONE_COMMIT

ARG PIP_INSTALL="pip install --no-cache-dir"
ARG EYNOLLAH_VERSION="0.0.1"


# Build pip installable stuff
RUN ${PIP_INSTALL} \
    "eynollah == ${EYNOLLAH_VERSION}"


# Copy OCR models
COPY data/eynollah /var/lib/eynollah


# Check pip dependencies
RUN pip check


# Default command
CMD ["ocrd-eynollah-segment"]