Skip to content
Snippets Groups Projects
Commit 1b980d2e authored by Jan David Mol's avatar Jan David Mol
Browse files

L2SS-621: Install our dependencies in the image to speed up the device start,...

L2SS-621: Install our dependencies in the image to speed up the device start, and to avoid redownloading the dependencies a lot when testing/debugging a device. Do recheck the dependencies when we start the containwr.
parent a093b491
No related branches found
No related tags found
1 merge request!241L2SS-621: Install our dependencies in the image to speed up the device start
......@@ -35,7 +35,7 @@ else
mkdir -p /tmp/tangostationcontrol
python3 setup.py build --build-base /tmp/tangostationcontrol egg_info --egg-base /tmp/tangostationcontrol bdist_wheel --dist-dir /tmp/tangostationcontrol || exit 1
# shellcheck disable=SC2012
sudo pip install --force-reinstall "$(ls -Art /tmp/tangostationcontrol/*.whl | tail -n 1)"
sudo pip install "$(ls -Art /tmp/tangostationcontrol/*.whl | tail -n 1)"
fi
# Return to the stored the directory, this preserves the working_dir argument in
......
......@@ -18,7 +18,8 @@ services:
# build explicitly, as docker-compose does not understand a local image
# being shared among services.
build:
context: lofar-device-base
context: ..
dockerfile: docker-compose/lofar-device-base/Dockerfile
args:
SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION}
container_name: ${CONTAINER_NAME_PREFIX}device-apsct
......
......@@ -18,7 +18,8 @@ services:
# build explicitly, as docker-compose does not understand a local image
# being shared among services.
build:
context: lofar-device-base
context: ..
dockerfile: docker-compose/lofar-device-base/Dockerfile
args:
SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION}
container_name: ${CONTAINER_NAME_PREFIX}device-apspu
......
......@@ -13,7 +13,8 @@ services:
# build explicitly, as docker-compose does not understand a local image
# being shared among services.
build:
context: lofar-device-base
context: ..
dockerfile: docker-compose/lofar-device-base/Dockerfile
args:
SOURCE_IMAGE: ${DOCKER_REGISTRY_HOST}/${DOCKER_REGISTRY_USER}-tango-itango:${TANGO_ITANGO_VERSION}
container_name: ${CONTAINER_NAME_PREFIX}device-beam
......
......@@ -17,7 +17,8 @@ services:
# build explicitly, as docker-compose does not understand a local image
# being shared among services.
build:
context: lofar-device-base
context: ..
dockerfile: docker-compose/lofar-device-base/Dockerfile
args:
SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION}
container_name: ${CONTAINER_NAME_PREFIX}device-boot
......
......@@ -18,7 +18,8 @@ services:
# build explicitly, as docker-compose does not understand a local image
# being shared among services.
build:
context: lofar-device-base
context: ..
dockerfile: docker-compose/lofar-device-base/Dockerfile
args:
SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION}
container_name: ${CONTAINER_NAME_PREFIX}device-docker
......
......@@ -17,7 +17,8 @@ services:
# build explicitly, as docker-compose does not understand a local image
# being shared among services.
build:
context: lofar-device-base
context: ..
dockerfile: docker-compose/lofar-device-base/Dockerfile
args:
SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION}
container_name: ${CONTAINER_NAME_PREFIX}device-observation_control
......
......@@ -18,7 +18,8 @@ services:
# build explicitly, as docker-compose does not understand a local image
# being shared among services.
build:
context: lofar-device-base
context: ..
dockerfile: docker-compose/lofar-device-base/Dockerfile
args:
SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION}
container_name: ${CONTAINER_NAME_PREFIX}device-recv
......
......@@ -18,7 +18,8 @@ services:
# build explicitly, as docker-compose does not understand a local image
# being shared among services.
build:
context: lofar-device-base
context: ..
dockerfile: docker-compose/lofar-device-base/Dockerfile
args:
SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION}
container_name: ${CONTAINER_NAME_PREFIX}device-sdp
......
......@@ -18,7 +18,8 @@ services:
# build explicitly, as docker-compose does not understand a local image
# being shared among services.
build:
context: lofar-device-base
context: ..
dockerfile: docker-compose/lofar-device-base/Dockerfile
args:
SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION}
container_name: ${CONTAINER_NAME_PREFIX}device-sst
......
......@@ -18,7 +18,8 @@ services:
# build explicitly, as docker-compose does not understand a local image
# being shared among services.
build:
context: lofar-device-base
context: ..
dockerfile: docker-compose/lofar-device-base/Dockerfile
args:
SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION}
container_name: ${CONTAINER_NAME_PREFIX}device-unb2
......
......@@ -18,7 +18,8 @@ services:
# build explicitly, as docker-compose does not understand a local image
# being shared among services.
build:
context: lofar-device-base
context: ..
dockerfile: docker-compose/lofar-device-base/Dockerfile
args:
SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION}
container_name: ${CONTAINER_NAME_PREFIX}device-xst
......
......@@ -17,7 +17,8 @@ services:
lofar-device-base:
image: lofar-device-base
build:
context: lofar-device-base
context: ..
dockerfile: docker-compose/lofar-device-base/Dockerfile
args:
SOURCE_IMAGE: ${LOCAL_DOCKER_REGISTRY_HOST}/${LOCAL_DOCKER_REGISTRY_USER}/tango-itango:${TANGO_ITANGO_VERSION}
container_name: ${CONTAINER_NAME_PREFIX}lofar-device-base
......
......@@ -3,17 +3,20 @@ FROM ${SOURCE_IMAGE}
RUN sudo apt-get update && sudo apt-get install -y git && sudo apt-get clean
COPY lofar-requirements.txt /lofar-requirements.txt
COPY docker-compose/lofar-device-base/lofar-requirements.txt /lofar-requirements.txt
RUN sudo pip3 install -r /lofar-requirements.txt
COPY tangostationcontrol/requirements.txt /tangostationcontrol-requirements.txt
RUN sudo pip3 install -r /tangostationcontrol-requirements.txt
# install and use ephimerides and geodetic ("measures") tables for casacore.
# we install a _stub_ since the tables need to be deployed explicitly from within the software.
RUN sudo mkdir -p /opt/IERS && sudo chmod a+rwx /opt/IERS
ARG IERS_DIRNAME=IERS-1970-01-01T00:00:00-stub
COPY WSRT_Measures_stub /opt/IERS/${IERS_DIRNAME}
COPY docker-compose/lofar-device-base/WSRT_Measures_stub /opt/IERS/${IERS_DIRNAME}
RUN ln -sfT /opt/IERS/${IERS_DIRNAME} /opt/IERS/current
COPY casarc /home/tango/.casarc
COPY docker-compose/lofar-device-base/casarc /home/tango/.casarc
ENV TANGO_LOG_PATH=/var/log/tango
RUN sudo mkdir -p /var/log/tango && sudo chmod a+rwx /var/log/tango
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment