# set base image (host OS) ARG PY_VERSION=3.10 CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX FROM $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX/python:${PY_VERSION} ARG BEC_SERVICE=bec_ipython_client OPHYD_DEVICES_BRANCH=main RUN echo "Building ${BEC_SERVICE} with Ophyd branch ${OPHYD_DEVICES_BRANCH} " RUN apt update RUN apt install redis -y RUN apt install git -y # set the working directory in the container WORKDIR /code # copy the content of the local opaas directory to the working directory COPY . ./bec RUN mkdir /code/bec/test_files ENV OPHYD_DEVICES_PATH=/code/bec/ophyd_devices WORKDIR /code/bec RUN git clone --branch ${OPHYD_DEVICES_BRANCH} https://gitlab.psi.ch/bec/ophyd_devices WORKDIR /code/bec/ophyd_devices RUN pip install -e . WORKDIR /code/bec/ RUN pip install -e pytest_bec_e2e RUN pip install -e bec_server[dev] RUN pip install -e bec_ipython_client[dev] RUN pip install -e bec_lib[dev] WORKDIR /code/bec/${BEC_SERVICE} # command to run on container start ENTRYPOINT ["pytest", "--files-path", "/code/bec/test_files", "--start-servers", "--flush-redis", "-v", "--random-order", "--maxfail=2", "./tests/end-2-end"]