-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from helenkirk/casa61-64
Casa61 64
- Loading branch information
Showing
10 changed files
with
238 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
FROM centos:7 | ||
#This dockerfile makes a centos7 container with library dependencies needed | ||
# for casa versions | ||
|
||
RUN yum clean all -y | ||
RUN yum makecache -y | ||
RUN yum update -y | ||
RUN yum install -y freetype libSM libXi libXrender libXrandr \ | ||
libXfixes libXcursor libXinerama fontconfig \ | ||
libxslt xauth xorg-x11-server-Xvfb dbus-x11 \ | ||
tkinter ImageMagick-c++ xterm perl autoconf python-sphinx graphviz xz | ||
|
||
RUN yum install -y firefox | ||
|
||
RUN yum install -y sssd-client acl | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
|
||
VERSIONS = \ | ||
7 | ||
|
||
|
||
DOCKER_REPO_BASE=images.canfar.net/skaha/centos | ||
|
||
.PHONY: build clean run | ||
|
||
all: build | ||
|
||
build: | ||
@- $(foreach V,$(VERSIONS), \ | ||
docker build -t ${DOCKER_REPO_BASE}:$(V) .; \ | ||
) | ||
|
||
clean: | ||
@- $(foreach V,$(VERSIONS), \ | ||
docker rmi ${DOCKER_REPO_BASE}:$(V) ; \ | ||
) | ||
|
||
|
||
upload: build | ||
@- $(foreach V,$(VERSIONS), \ | ||
docker push ${DOCKER_REPO_BASE}:$(V) ; \ | ||
) | ||
clean_all: clean | ||
upload_all: upload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule admit
added at
bbf3d7
36 changes: 36 additions & 0 deletions
36
science-containers/Dockerfiles/casa/version-6.1-6.4/download.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ $# -lt 2 ] | ||
then | ||
echo "usage: $0 <version> <"old"|"current">" | ||
exit 1 | ||
fi | ||
|
||
RELEASE=$1 | ||
FILE="${RELEASE}.tar.xz" | ||
|
||
if [ $2 == "old" ]; then | ||
URL="https://casa.nrao.edu/download/distro/casa/release/rhel//${FILE}" | ||
elif [ $2 == "pipeline" ]; then | ||
URL="https://casa.nrao.edu/download/distro/casa-pipeline/release/linux/${FILE}" | ||
else | ||
URL="https://casa.nrao.edu/download/distro/casa/release/rhel/${FILE}" | ||
fi | ||
|
||
# make sure we are in the source folder | ||
HERE=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) | ||
cd $HERE | ||
|
||
if [ ! -e "$FILE" ]; then | ||
curl -O $URL | ||
else | ||
echo "$FILE already downloaded." | ||
fi | ||
|
||
FILE="admit" | ||
URL="https://github.com/astroumd/${FILE}" | ||
if [ ! -e "$FILE" ]; then | ||
git clone $URL | ||
else | ||
echo "$FILE already downloaded." | ||
fi |
75 changes: 49 additions & 26 deletions
75
science-containers/Dockerfiles/casa/version-6.1-6.4/extract-casaviewer.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,59 @@ | ||
#!/bin/bash | ||
#NB: needs to be edited for casa version in first coding line below | ||
# AppImage fix applies now too casaviewer, casaplotms | ||
# and new: casalogger, casaplotserver, casatablebrowser, casafeather | ||
|
||
#casavers=casa-6.5.4-9-pipeline-2023.1.0.124 | ||
#casavers=casa-6.5.3-28-pipeline-2023.0.0.36 | ||
#casavers=casa-6.4.1-12-pipeline-2022.2.0.64 | ||
#casavers=casa-6.2.1-7-pipeline-2021.2.0.128 | ||
casavers=casa-6.1.1-15-pipeline-2020.1.0.40 | ||
#casavers=casa-6.3.0-48 | ||
#casavers=casa-6.2.0-124 | ||
#casavers=casa-6.1.0-118 | ||
#casavers=casa-6.4.0-16 | ||
#casavers=casa-6.4.3-27 | ||
|
||
#pyvers=python3.8 | ||
pyvers=python3.6 | ||
|
||
pushd /opt | ||
casaviewer=$(python3 -m casaviewer --app-path 2> /dev/null | grep casaviewer) | ||
echo ${casaviewer} | ||
#below command was original way of structuring this, but not working anymore | ||
#manually inputting casavers above to get around this | ||
#casaviewer=$(python3 -m casaviewer --app-path 2> /dev/null | grep casaviewer) | ||
#echo ${casaviewer} | ||
casaviewer=/opt/${casavers}/lib/py/lib/${pyvers}/site-packages/casaviewer/__bin__/casaviewer-x86_64.AppImage | ||
${casaviewer} --appimage-extract 2> /dev/null | ||
|
||
mv /opt/casa/bin/casaviewer /opt/casa/bin/casaviewer.old | ||
ln -s /opt/squashfs-root/AppRun /opt/casa/bin/casaviewer | ||
#ln -s /opt/squashfs-root/AppRun /usr/local/bin/casaviewer | ||
|
||
#additional steps courtesy of CASA helpdesk | ||
mv /opt/casa/lib/py/lib/python3.6/site-packages/casaviewer/__bin__/casaviewer-x86_64.AppImage /opt/casa/lib/py/lib/python3.6/site-packages/casaviewer/__bin__/casaviewer-x86_64.AppImage.orig | ||
ln -s /opt/squashfs-root/usr/bin/casaviewer /opt/casa/lib/py/lib/python3.6/site-packages/casaviewer/__bin__/casaviewer-x86_64.AppImage | ||
|
||
#additional steps below to fix a similar problem for plotms | ||
# Right now, need to uncomment out each specific version for the first | ||
# command to run. Hopefully this can be tidied up to something similar to the | ||
# first set of commands above | ||
|
||
#---- Choose the correct line/version below & uncomment out ------ | ||
#/opt/casa-6.1.0-118/lib/py/lib/python3.6/site-packages/casaplotms/__bin__/casaplotms-x86_64.AppImage --appimage-extract 2> /dev/null | ||
#/opt/casa-6.2.0-124/lib/py/lib/python3.6/site-packages/casaplotms/__bin__/casaplotms-x86_64.AppImage --appimage-extract 2> /dev/null | ||
#/opt/casa-6.3.0-48/lib/py/lib/python3.6/site-packages/casaplotms/__bin__/casaplotms-x86_64.AppImage --appimage-extract 2> /dev/null | ||
/opt/casa-6.4.1-12-pipeline-2022.2.0.64/lib/py/lib/python3.6/site-packages/casaplotms/__bin__/casaplotms-x86_64.AppImage --appimage-extract 2> /dev/null | ||
#/opt/casa-6.2.1-7-pipeline-2021.2.0.128/lib/py/lib/python3.6/site-packages/casaplotms/__bin__/casaplotms-x86_64.AppImage --appimage-extract 2> /dev/null | ||
#/opt/casa-6.1.1-15-pipeline-2020.1.0.40/lib/py/lib/python3.6/site-packages/casaplotms/__bin__/casaplotms-x86_64.AppImage --appimage-extract 2> /dev/null | ||
#/opt/casa-6.4.0-16/lib/py/lib/python3.6/site-packages/casaplotms/__bin__/casaplotms-x86_64.AppImage --appimage-extract 2> /dev/null | ||
#/opt/casa-6.4.3-27/lib/py/lib/python3.6/site-packages/casaplotms/__bin__/casaplotms-x86_64.AppImage --appimage-extract 2> /dev/null | ||
#/opt/casa-6.4.4-31/lib/py/lib/python3.6/site-packages/casaplotms/__bin__/casaplotms-x86_64.AppImage --appimage-extract 2> /dev/null | ||
#---------------- | ||
|
||
#the two commands below apply to all versions to finish fixing plotms | ||
mv /opt/casa/lib/py/lib/python3.6/site-packages/casaplotms/__bin__/casaplotms-x86_64.AppImage /opt/casa/lib/py/lib/python3.6/site-packages/casaplotms/__bin__/casaplotms-x86_64.AppImage.orig | ||
ln -s /opt/squashfs-root/usr/bin/casaplotms /opt/casa/lib/py/lib/python3.6/site-packages/casaplotms/__bin__/casaplotms-x86_64.AppImage | ||
#NB: casa6.5 and higher use python3.8, only option | ||
mv /opt/casa/lib/py/lib/${pyvers}/site-packages/casaviewer/__bin__/casaviewer-x86_64.AppImage /opt/casa/lib/py/lib/${pyvers}/site-packages/casaviewer/__bin__/casaviewer-x86_64.AppImage.orig | ||
ln -s /opt/squashfs-root/usr/bin/casaviewer /opt/casa/lib/py/lib/${pyvers}/site-packages/casaviewer/__bin__/casaviewer-x86_64.AppImage | ||
|
||
#Apply similar process for other packages | ||
#1) extract AppImage | ||
/opt/${casavers}/lib/py/lib/${pyvers}/site-packages/casaplotms/__bin__/casaplotms-x86_64.AppImage --appimage-extract 2> /dev/null | ||
/opt/${casavers}/lib/py/lib/${pyvers}/site-packages/casalogger/__bin__/casalogger-x86_64.AppImage --appimage-extract 2> /dev/null | ||
/opt/${casavers}/lib/py/lib/${pyvers}/site-packages/casafeather/__bin__/casafeather-x86_64.AppImage --appimage-extract 2> /dev/null | ||
/opt/${casavers}/lib/py/lib/${pyvers}/site-packages/casaplotserver/__bin__/casaplotserver-x86_64.AppImage --appimage-extract 2> /dev/null | ||
/opt/${casavers}/lib/py/lib/${pyvers}/site-packages/casatablebrowser/__bin__/casatablebrowser-x86_64.AppImage --appimage-extract 2> /dev/null | ||
|
||
#2a) move old AppImage | ||
mv /opt/casa/lib/py/lib/${pyvers}/site-packages/casaplotms/__bin__/casaplotms-x86_64.AppImage /opt/casa/lib/py/lib/${pyvers}/site-packages/casaplotms/__bin__/casaplotms-x86_64.AppImage.orig | ||
mv /opt/casa/lib/py/lib/${pyvers}/site-packages/casalogger/__bin__/casalogger-x86_64.AppImage /opt/casa/lib/py/lib/${pyvers}/site-packages/casalogger/__bin__/casalogger-x86_64.AppImage.orig | ||
mv /opt/casa/lib/py/lib/${pyvers}/site-packages/casafeather/__bin__/casafeather-x86_64.AppImage /opt/casa/lib/py/lib/${pyvers}/site-packages/casafeather/__bin__/casafeather-x86_64.AppImage.orig | ||
mv /opt/casa/lib/py/lib/${pyvers}/site-packages/casaplotserver/__bin__/casaplotserver-x86_64.AppImage /opt/casa/lib/py/lib/${pyvers}/site-packages/casaplotserver/__bin__/casaplotserver-x86_64.AppImage.orig | ||
mv /opt/casa/lib/py/lib/${pyvers}/site-packages/casatablebrowser/__bin__/casatablebrowser-x86_64.AppImage /opt/casa/lib/py/lib/${pyvers}/site-packages/casatablebrowser/__bin__/casatablebrowser-x86_64.AppImage.orig | ||
|
||
#2b) link to new one | ||
ln -s /opt/squashfs-root/usr/bin/casaplotms /opt/casa/lib/py/lib/${pyvers}/site-packages/casaplotms/__bin__/casaplotms-x86_64.AppImage | ||
ln -s /opt/squashfs-root/usr/bin/casalogger /opt/casa/lib/py/lib/${pyvers}/site-packages/casalogger/__bin__/casalogger-x86_64.AppImage | ||
ln -s /opt/squashfs-root/usr/bin/casafeather /opt/casa/lib/py/lib/${pyvers}/site-packages/casafeather/__bin__/casafeather-x86_64.AppImage | ||
ln -s /opt/squashfs-root/usr/bin/casaplotserver /opt/casa/lib/py/lib/${pyvers}/site-packages/casaplotserver/__bin__/casaplotserver-x86_64.AppImage | ||
ln -s /opt/squashfs-root/usr/bin/casatablebrowser /opt/casa/lib/py/lib/${pyvers}/site-packages/casatablebrowser/__bin__/casatablebrowser-x86_64.AppImage | ||
|
||
|
||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
echo "INIT START" | ||
echo "sourcing admit_start.sh" | ||
source /opt/admit/admit_start.sh | ||
echo "INIT DONE" |
62 changes: 62 additions & 0 deletions
62
science-containers/Dockerfiles/casa/version-6.1-6.4/nsswitch.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# | ||
# /etc/nsswitch.conf | ||
# | ||
# An example Name Service Switch config file. This file should be | ||
# sorted with the most-used services at the beginning. | ||
# | ||
# The entry '[NOTFOUND=return]' means that the search for an | ||
# entry should stop if the search in the previous entry turned | ||
# up nothing. Note that if the search failed due to some other reason | ||
# (like no NIS server responding) then the search continues with the | ||
# next entry. | ||
# | ||
# Valid entries include: | ||
# | ||
# nisplus Use NIS+ (NIS version 3) | ||
# nis Use NIS (NIS version 2), also called YP | ||
# dns Use DNS (Domain Name Service) | ||
# files Use the local files | ||
# db Use the local database (.db) files | ||
# compat Use NIS on compat mode | ||
# hesiod Use Hesiod for user lookups | ||
# [NOTFOUND=return] Stop searching if not found so far | ||
# | ||
|
||
# To use db, put the "db" in front of "files" for entries you want to be | ||
# looked up first in the databases | ||
# | ||
# Example: | ||
#passwd: db files nisplus nis | ||
#shadow: db files nisplus nis | ||
#group: db files nisplus nis | ||
|
||
passwd: sss files | ||
shadow: files sss | ||
group: sss files | ||
|
||
#hosts: db files nisplus nis dns | ||
hosts: files dns | ||
|
||
# Example - obey only what nisplus tells us... | ||
#services: nisplus [NOTFOUND=return] files | ||
#networks: nisplus [NOTFOUND=return] files | ||
#protocols: nisplus [NOTFOUND=return] files | ||
#rpc: nisplus [NOTFOUND=return] files | ||
#ethers: nisplus [NOTFOUND=return] files | ||
#netmasks: nisplus [NOTFOUND=return] files | ||
|
||
bootparams: nisplus [NOTFOUND=return] files | ||
|
||
ethers: files | ||
netmasks: files | ||
networks: files | ||
protocols: files | ||
rpc: files | ||
services: files | ||
|
||
netgroup: nisplus | ||
|
||
publickey: nisplus | ||
|
||
automount: files nisplus | ||
aliases: files nisplus |
27 changes: 27 additions & 0 deletions
27
science-containers/Dockerfiles/casa/version-6.1-6.4/update-data.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/usr/bin/perl | ||
## | ||
## move rsync point from svn.cv.nrao.edu to casa.nrao.edu | ||
## | ||
use File::Find; | ||
|
||
if ( scalar(@ARGV) < 1 ) { die "$0 requires path to CASA installation to be patched..." } | ||
if ( scalar(@ARGV) > 1 ) { die "$0 requires only one parameter which is the path to CASA installation to be patched..." } | ||
|
||
unless ( -d $ARGV[0] ) { die "$0 requires path to CASA installation (which should be a directory) to be patched..." } | ||
|
||
sub locate_script { | ||
if ( -f $_ && $_ eq "update-data" ) { | ||
print "substituting $File::Find::dir/$_\n"; | ||
open( CONTENTS, "< $_" ); | ||
my @contents = <CONTENTS>; | ||
close( CONTENTS ); | ||
open( CONTENTS, "> $_" ); | ||
foreach my $x ( @contents ) { | ||
$x =~ s@(?:rsync://svn.cv.nrao.edu/casa-data|rsync://casa.nrao.edu/casa-data)@rsync://casa-rsync.nrao.edu/casa-data@g; | ||
print CONTENTS "$x"; | ||
} | ||
close( CONTENTS ); | ||
} | ||
} | ||
|
||
find( { wanted => \&locate_script }, $ARGV[0] ); |