Skip to content

Latest commit

 

History

History
50 lines (37 loc) · 1.78 KB

README.org

File metadata and controls

50 lines (37 loc) · 1.78 KB

Deployment

Building the container

To build the container, run the following command:

docker build <path-to-project-root-folder> --tag vtk-web

Running the container

To run the container, run the following command:

docker run -D --rm -p <PORT>:80 vtk-web

Useful flags

  • -D runs ths container in dettached mode, i.e, in the background.
  • -it runs the container in interative mode, i.e, lets you see the console output.
  • --rm removes the container when exiting.
  • --name gives the container a running name to access it better.

Accessing the logs

First, enter the container command line by running:

docker exec -it <CONTAINER-NAME> bash

Note: if no name was specified during the docker run command, the name of the container can be obtained by running

docker ps -a

The logs are located in ~/deploy/server/logs. This folders has two subfolders:

  • apache/ contains the logs of the internal apache server.
  • launcher/ contains the logs of the application execution.
    • One file with an UUID prefix is created each time a new session is created.

How does the container work?

Using the correct vtk version

Since docker does not have a graphical X interface, we need a vtk build that targets headless systems. Vtk can built with EGL (targetting NVIDIA GPUs) or with osmesa (targetting only CPUs), however, Kitware only publishes the osmesa variant under vtk osmesa.

To force the program to run with this build of vtk, we first need to install it normally with the unwanted version of vtk to then remove it and install the correct one. All of this is done in the initialization script.