readme.md

Docker build scripts for CASA

These scripts provide a way to build Casa in a manylinux2010 container.

You will need the following:

  1. casa-data checked out
  2. casa-data-req checked out
  3. casa6 and casashell source checked out in <casasourcelocation> e.g.

<casasourcelocation>
├── casa6
├── casashell

  1. Docker installed

Run the following command to start a container. Replace <path> and <casasourcelocation> with the actual paths.

py38 and -p3.8 should be replaced with the actual Python version you wish to use.

export build_container=`python casa_docker_setup.py -i vsuorant/casatools-manylinux2010-py38:2 -d <path>/casa-data -r <path>/casa-data-req -s <casasourcelocation>/ -c <path>/ccache/`

Note that the above command sets a $build_container environment variable that is used as an input to to the next command.

python build_casa.py -p3.8 -c $build_container -u $USER -d $UID -b bdist_wheel --debug

This will create casatools, casatasks and casashell wheels in your source directory. You can find the actual files with

find <path>/source -name *.whl

You should use the manylinux2010 casatools wheel for testing instead of the linux_x86_64 variant.

Another build target is "genmake". This will do a parallel build but won't produce wheels.

The build process also copies libgfortran.so.3 in <path>/source/extralibs. This is needed on some systems that do not provide it (for example Ubuntu 20.04).

You can copy the file to the appropriate location if necessary with

Ubuntu

sudo cp source/extralibs/libgfortran.so.3 /usr/lib/x86_64-linux-gnu/libgfortran.so.3

RHEL 8 Note: You will need to install libnsl and compat-libgfortran-48 with

sudo yum install libnsl compat-libgfortran-48

There is no need to create a new Docker container every time. build_casa.py script can be executed repeatedly in the same container.

If the container is stopped, it can be be restarted with

docker container start <container id>

To list running containers

docker container list

To include stopped containers in the list

docker container list --all

The container can be stopped and removed with

docker container stop $build_container

docker container rm $build_container

Note: The build script does not attempt to clean up the workspace in any way so you need to do it manually as necessary.

Add shortcut

Everything looks good. We'll let you know here if there's anything you should know about.