Skip to content

Phylanx in Containers

Steven R. Brandt edited this page Jul 27, 2020 · 7 revisions

The latest working Phylanx is available on [dockerhub]

  • stevenrbrandt/phylanx.devenv:working - BUILD_TYPE=Debug, Phylanx is not built, but HPX, blaze, etc. is built. On rostam singularity exec ~sbrandt/phylanx-devenv.simg bash
  • stevenrbrandt/phylanx.rel.devenv:working - BUILD_TYPE=Release, Phylanx is not built, but HPX, blaze, etc. is built. On rostam singularity exec ~sbrandt/phylanx-devenv.rel.simg bash
  • stevenrbrandt/phylanx.test:working - BUILD_TYPE=Debug, Phylanx is built. Set export PYTHONUSERBASE=/usr/local/userbase to use. On rostam singularity exec ~sbrandt/phylanx-test.simg
  • stevenrbrandt/phylanx.rel.test:working- BUILD_TYPE=Release, Phylanx is built. Set export PYTHONUSERBASE=/usr/local/userbase to use. On rostam singularity exec ~sbrandt/phylanx-test.rel.simg

Note: It may be convenient to add code like this to your .bashrc if you want PYTHONUSERBASE to be automatically set:

if [ "$SINGULARITY_CONTAINER" = "/home/sbrandt/phlanx.re..test:working" ]
then
    PYTHONUSERBASE=/usr/local/userbase
fi

Note: Test images are so named because the phylanx test suite has been run against the codebase.

To use one of the above images on your desktop (e.g. stevenrbrandt/phylanx.devenv:working), you can install docker and docker-compose then create a file named docker-compose with the following contents:

version: '2'

# This volume allows you to preserve your work
# between invocations of this image.
volumes:
   homefs-phylanx-devenv:

services:

  phylanx-workspace:
    image: stevenrbrandt/phylanx.devenv:working
    container_name: devenv
    user: jovyan
    volumes:
      - homefs-phylanx-devenv:/home/jovyan

If you now run the docker-compose up -d command, it will start a docker instance on your machine. If you type docker exec -it devenv bash you will get a bash shell inside the container and you can run build.sh as described below.

On Rostam

If you develop on Rostam, you can use Singularity as follows:

> singularity exec ~sbrandt/images/phylanx-devenv.simg bash

to build, run the following inside the container:

> export BUILD_TYPE=Debug
> build.sh install

By default, build.sh will install phylanx into ~/phylanx.

If you wish to make sure cmake is run or re-run, add config to the build.sh args.

> build.sh config install

Any args other than config will be passed to make, so you can run build.sh install tests etc.

Clone this wiki locally