|
| 1 | +UV-CDAT Docker images |
| 2 | +===================== |
| 3 | + |
| 4 | +Docker images of UV-CDAT are available at [docker hub](https://registry.hub.docker.com/u/uvcdat/uvcdat/). These |
| 5 | +images are built with offscreen rendering and no GUI support due to limitations in docker; however, it is possible |
| 6 | +to render images from UV-CDAT scripts or directly using the commandline interface. The primary motivation for |
| 7 | +the creation of these images is for easy deployment of visualization servers for CDATWeb, but users may find |
| 8 | +them useful for quick image generation or data exploration without needing to build and configure the UV-CDAT |
| 9 | +environment. |
| 10 | + |
| 11 | +To try using the latest version of UV-CDAT, first [install](https://docs.docker.com/compose/install/) Docker |
| 12 | +for your platform. Note, Docker runs natively on Linux, but requires a lightweight virtual machine on Mac and |
| 13 | +Windows. The management of this virtual machine is handled through the `boot2docker` command. Typically, |
| 14 | +you will need to start up the virtual machine with `boot2docker start` and configure the environment with |
| 15 | +`$(boot2docker shellinit)`. See the docker installation guide for more information. |
| 16 | + |
| 17 | +Running uvcdat once docker is set up is easy: |
| 18 | +``` |
| 19 | +docker run -i -t uvcdat/uvcdat ipython |
| 20 | +``` |
| 21 | +This will download the docker image, run it in a new container, and give an ipython shell inside the container. |
| 22 | +From here, you can import all python modules that are shipped with the CLI version of UV-CDAT. |
| 23 | + |
| 24 | +Building the docker images |
| 25 | +-------------------------- |
| 26 | + |
| 27 | +The `Dockerfile` for building UV-CDAT is stored at the root level of this repository. It is built on top of |
| 28 | +a custom Ubuntu 14.04 install containing all necessary dependencies. Generally it will not be necessary to |
| 29 | +rebuild this base image, but if new packages are necessary from apt, they can be added to `docker/ubuntu/Dockerfile` |
| 30 | +and the image rebuilt with `docker build -t uvcdat/ubuntu`. |
| 31 | + |
| 32 | +When updating master, a new `uvcdat/uvcdat:latest` should be generated and pushed to docker hub. The |
| 33 | +build should be initiated from a clean checkout of the repository to avoid adding unnecessary files to the |
| 34 | +image. From the top level of the repository, issue the following command to build the image. |
| 35 | +``` |
| 36 | +docker build -t uvcdat/uvcdat . |
| 37 | +``` |
| 38 | +Once it is built successfully you can test the image with ctest and upload the results to |
| 39 | +[CDash](https://open.cdash.org/index.php?project=UV-CDAT&display=project) with |
| 40 | +``` |
| 41 | +docker run ctest -S /usr/src/uvcdat/CMake/dashboard/docker.cmake -VV |
| 42 | +``` |
| 43 | +Finally, if you have push access to the docker hub account, you can push the image up to docker. |
| 44 | +``` |
| 45 | +docker push uvcdat/uvcdat |
| 46 | +``` |
| 47 | + |
| 48 | +Note that UV-CDAT probably won't build with the standard VM setup by `boot2docker`. If you get build errors, you |
| 49 | +may need to increase the memory and disk size when initializing. For example, to create a VM with 4 GB of RAM and |
| 50 | +50 GB of disk space: |
| 51 | +``` |
| 52 | +boot2docker --memory=4096 --disksize=50000 |
| 53 | +``` |
0 commit comments