Skip to content
Snippets Groups Projects
Commit 34986a02 authored by Marcel Loose's avatar Marcel Loose :sunglasses:
Browse files

Solve invalid pointer issue when loading skymodel

parent 25f79a15
No related branches found
No related tags found
1 merge request!54Solve invalid pointer issue when loading skymodel
......@@ -11,9 +11,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get install -y \
bison \
build-essential \
casacore-data \
casacore-dev \
casacore-tools \
cmake \
flex \
gfortran \
......@@ -59,10 +57,12 @@ RUN cmake \
RUN ninja -C /src/idg/build install
# Install EveryBeam
# Do not compile python bindings, they will interfere with the ones in the
# binary wheel on PyPI.
RUN git shallow-clone https://git.astron.nl/RD/EveryBeam.git
RUN cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DBUILD_WITH_PYTHON=ON \
-DBUILD_WITH_PYTHON=OFF \
-DBUILD_TESTING=OFF \
-DPORTABLE=${PORTABLE} \
-H/src/EveryBeam \
......@@ -154,7 +154,8 @@ COPY --from=builder /usr/local /usr/local
# Only install run-time required packages
RUN export DEBIAN_FRONTEND=noninteractive && \
apt-get update && \
apt-get install -y \
apt-get install -y --no-install-recommends \
ca-certificates \
casacore-tools \
libarmadillo9 \
libatkmm-1.6-1v5 \
......@@ -191,17 +192,15 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
RUN rm -rf /var/lib/apt/lists/*
# Install WSRT Measures (extra casacore data). We purposely do this in the
# `runner` stage and not in the `builder` stage, because otherwise the
# previous `apt-get install` would clobber the files we had installed in
# in the `builder` stage (as `casacore-data` is installed as a dependency).
# Install the casacore measures data. We purposely do not install these from
# the Ubuntu repository, but download the latest version directly from the
# ASTRON ftp site.
# Note: The file on the ftp site is updated daily. When warnings regarding
# leap seconds appear, ignore them or regenerate the docker image.
RUN wget -q -O /WSRT_Measures.ztar \
ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar && \
cd /var/lib/casacore/data && \
tar xfz /WSRT_Measures.ztar && \
rm /WSRT_Measures.ztar
RUN mkdir -p /usr/share/casacore/data && \
ln -s /usr/share/casacore /var/lib/casacore && \
wget -qO - ftp://ftp.astron.nl/outgoing/Measures/WSRT_Measures.ztar | \
tar -C /usr/share/casacore/data -xzf -
# Try to run the compiled tools to make sure they run without
# a problem (e.g. no missing libraries).
......@@ -213,4 +212,3 @@ RUN aoflagger --version && \
COPY . /tmp/rapthor
RUN python3 -m pip install --upgrade --no-cache-dir /tmp/rapthor
RUN rm -rf /tmp/*
FROM python:3.9
RUN apt-get update && \
apt-get install -y \
gdb \
less \
strace \
vim
RUN groupadd \
-g 1001 \
rapthor
RUN useradd \
-g 1001 \
-m \
-s /bin/bash \
-u 15511 \
rapthor
USER rapthor
WORKDIR /home/rapthor
RUN python3 -m venv venv && \
. venv/bin/activate && \
pip install git+https://git.astron.nl/RD/rapthor.git@RAP-296_invalid-pointer-when-loading-skymodel
File moved
import lsmtool
s = lsmtool.load(
'/project/rapthor/Share/rapthor/run_480ch_5chunks_flag/skymodels/calibrate_1/calibration_skymodel_small.txt',
beamMS='/project/rapthor/Share/rapthor/L632477_480ch_50min/allbands.ms.mjd5020562823_field.ms')
s.getColValues('I', applyBeam=True)
#!/bin/bash -x
mkdir -p /tmp/loose/rapthor-debug
docker run -it --rm \
-v /project/rapthor/Share/rapthor/run_480ch_5chunks_flag:/project/rapthor/Share/rapthor/run_480ch_5chunks_flag:ro \
-v /project/rapthor/Share/rapthor/L632477_480ch_50min:/project/rapthor/Share/rapthor/L632477_480ch_50min:ro \
-v /tmp/loose/rapthor-debug:/tmp:rw \
--entrypoint /bin/bash \
rapthor-debug
File moved
docker build -t rapthor-debug .
File moved
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment