FROM openlibrary/olbase:latest

ENV PYTHONPATH=/openlibrary:/openlibrary/vendor/infogami

USER root
COPY requirements*.txt ./
RUN pip install -r requirements_test.txt

WORKDIR /openlibrary/scripts/solr_builder

RUN pip install \
    # For real-time profiling
    cprofilev \
    # Faster python
    Cython==3.0.6

# Build cython files
COPY . /openlibrary
RUN ./build-cython.sh

EXPOSE 4000
