Skip to content

Commit

Permalink
Merge pull request #116 from helenkirk/casa5
Browse files Browse the repository at this point in the history
Casa5
  • Loading branch information
brianmajor authored Aug 29, 2024
2 parents 010b1e8 + 9127cdb commit 3a5c232
Show file tree
Hide file tree
Showing 10 changed files with 155 additions and 183 deletions.

This file was deleted.

55 changes: 0 additions & 55 deletions science-containers/Dockerfiles/casa/version-4.5-5.8/Dockerfile

This file was deleted.

103 changes: 0 additions & 103 deletions science-containers/Dockerfiles/casa/version-4.5-5.8/Makefile

This file was deleted.

87 changes: 87 additions & 0 deletions science-containers/Dockerfiles/casa/version-5.0-5.8/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
FROM images.canfar.net/skaha/centos:6.10
#NB: 6.10 version is needed (rather than generic 6) to get UVMultiFit package
# dependencies to install properly via yum

#final sets of package installations: As of Aug 22/24, cannot re-build
# centos6.10 base container from source

#Admit & analysisUtils packages, respectively:
RUN yum install -y tcsh wget && \
#additional packages for UVmultifit
yum install -y gcc gcc-c++ gsl-devel fftw-devel git.x86_64

# setup all required env variables
ARG CASA_RELEASE
ENV CASA_RELEASE=${CASA_RELEASE}
ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/casa/bin

# untar casa databundle to container
ADD ${CASA_RELEASE}.tar.gz /opt/

# chown because the untarred casa has wrong owner/group
RUN chown -R root:root /opt/${CASA_RELEASE} && ln -s /opt/${CASA_RELEASE} /opt/casa


# add the admit enhancement (issue #25)
RUN mkdir /opt/admit
ADD admit /opt/admit
RUN cd /opt/admit && \
autoconf && ./configure --with-casa-root=/opt/${CASA_RELEASE}

# Allow runtime symlink creation to the casa-data-repository
# Create a dangling symlink to casa-data-repository so that after deployment
# the symlink will link to the actual casa-data-repository in storage.
RUN mkdir -p /arc/projects/casa-data-repository && \
rm -rf /opt/${CASA_RELEASE}/data && \
ln -s /arc/projects/casa-data-repository/ /opt/${CASA_RELEASE}/data && \
chmod 777 /opt/${CASA_RELEASE} && \
rm -rf /arc && \
#
mkdir /skaha
ADD init.sh /skaha/

# generate missing dbus uuid (issue #47)
RUN dbus-uuidgen --ensure

ADD nsswitch.conf /etc/

#install UVMultiFit from github. Recommended location for install as below
#user imports into casa after initiating a session by typing
# 'from NordicARC import uvmultifit as uvm'
RUN mkdir /opt/casa/NordicARC && \
#(NB: this link is for the 'master' branch which does the python2 version)
cd /opt/casa/NordicARC && \
git clone https://github.com/onsala-space-observatory/UVMultiFit.git && \
#now update the CASA path within the Makefile, in a somewhat clunky way
cd /opt/casa/NordicARC/UVMultiFit && \
echo "CASADIR="/opt/${CASA_RELEASE} >> casadir.txt && \
cat casadir.txt Makefile >> Makefile2 && \
cd /opt/casa/NordicARC/UVMultiFit && \
mv Makefile2 Makefile && rm -f casadir.txt && \
#run the installation script
cd /opt/casa/NordicARC/UVMultiFit && make install && \
#-----------------
#One final note relevant for users: the recommended install tests expect
# the tests to be run in the program directory, where users will not
# have write access in our containers. One easy solution is to copy the
# relevant directories from /UVMultiFit into a user's directory and then
# run the tests there.
#
#have the UVMultiFit import instructions echoed to terminal start-up
echo 'cat /etc/motd' >> /etc/profile.d/motd.sh && \
echo 'To load the UVMultiFit package, initiate casa then type "from NordicARC import uvmultifit as uvm"' >> /etc/motd && \
#
#Add in analysisUtils package
mkdir /opt/casa/analysisUtils && \
cd /opt/casa/analysisUtils && \
wget ftp://ftp.cv.nrao.edu/pub/casaguides/analysis_scripts.tar && \
tar -xvf analysis_scripts.tar
#(if above doesn't work, can manually download the package and add as below)
#ADD ./analysis_scripts.tar /opt/casa/analysisUtils/
#NB: the analysisUtils path is added to the CASA startup file in the init.sh script
# (needs access to user's $HOME)


RUN cd /opt/${CASA_RELEASE}

CMD [ "/skaha/init.sh" ]
67 changes: 67 additions & 0 deletions science-containers/Dockerfiles/casa/version-5.0-5.8/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
VERSIONS = \
# 5.0.0-218.el6 #\
# 5.1.0-74.el6 #\
# 5.1.1-5.el6 #\
# 5.1.2-4.el6 #\
# 5.3.0-143.el6 #\
# 5.4.0-70.el6 #\
# 5.4.1-32.el6 #\
# 5.4.2-8.el6 #\
# 5.5.0-149.el6 #\
# 5.6.0-60.el6 #\
# 5.7.0-134.el6 #\
# 5.7.2-4.el6 #\
# 5.8.0-109.el6


VERSIONS_PIPELINE = \
# 5.6.1-8.el6
# 5.6.2-6.el6 #NB: not used in ALMA operations, no longer on CANFAR
# 5.6.3-19.el6 #NB: not used in ALMA operations, no longer on CANFAR


DOCKER_REPO_BASE=images.canfar.net/casa-5/casa

.PHONY: build clean run

all: build build-pipeline

build:
@- $(foreach V,$(VERSIONS), \
./download.sh casa-release-$(V) current ; \
docker build --build-arg CASA_RELEASE=casa-release-$(V) -t ${DOCKER_REPO_BASE}:$(V) .; \
)

build-pipeline:
@- $(foreach V,$(VERSIONS_PIPELINE), \
./download.sh casa-pipeline-release-$(V) pipeline ; \
docker build --build-arg CASA_RELEASE=casa-pipeline-release-$(V) -t ${DOCKER_REPO_BASE}:$(V) .; \
)


clean:
@- $(foreach V,$(VERSIONS), \
docker rmi ${DOCKER_REPO_BASE}:$(V) ; \
)

clean-pipeline:
@- $(foreach V,$(VERSIONS_PIPELINE), \
docker rmi ${DOCKER_REPO_BASE}:$(V) ; \
)


clean-all: clean clean-pipeline


upload: build
@- $(foreach V,$(VERSIONS), \
docker push ${DOCKER_REPO_BASE}:$(V) ; \
)

upload-pipeline: build-pipeline
@- $(foreach V,$(VERSIONS_PIPELINE), \
docker push ${DOCKER_REPO_BASE}:$(V) ; \
)


upload-all: upload upload-pipeline
1 change: 1 addition & 0 deletions science-containers/Dockerfiles/casa/version-5.0-5.8/admit
Submodule admit added at bbf3d7

0 comments on commit 3a5c232

Please sign in to comment.