Docker
The ncareol/soloii
Docker image is hosted on Docker Hub: https://hub.docker.com/r/ncareol/soloii/.
Docker must be installed and running.
-
Docker is typically available as the
docker
package in Linux distributions' package managers. In RHEL 6 and the 6 series of RHEL-derived distributions, e.g. CentOS 6 and Scientific Linux 6, Docker is available as thedocker-io
package. -
Start Docker:
-
For distributions w/ systemd-based init systems:
sudo systemctl enable docker sudo systemctl start docker
-
For distributions w/ Sys-V-based init systems:
sudo service docker start
To set Docker to start on boot in Sys-V-based init systems:
sudo chkconfig --add docker
-
-
Create
docker
group and add your user to it:sudo groupadd docker sudo usermod -aG docker `whoami`
You will then need to restart Docker and open a new shell session for your user to recognize that it has been added to the
docker
group.
Install Docker for Mac and open Docker.app
Install and run Docker for Windows
An X window server must be installed. If you are running a desktop environment, e.g. GNOME or KDE, then this prerequisite is satisfied.
macOS: XQuartz is a popular X window system for macOS that has been used to run lrose-soloii
on macOS. Please see the X11 section below for authorizing X11 connections. Xquartz.app must be started when for lrose-soloii
to run as an X application.
Windows: a variety of X window systems are available, including:
The easiest way to run lrose-soloii
on Linux and macOS is via the soloii-docker
helper script. Download the script, make it executable, and then run it w/ the path to a directory containing data files. E.g.
curl -O https://raw.githubusercontent.com/NCAR/lrose-soloii/master/docker/soloii-docker
chmod +x soloii-docker
./soloii-docker /path/to/data
The soloii
version can be specified as a second, optional argument to the soloii-docker
script, e.g.
./soloii-docker /path/to/data 1.18
At this time, 1.20
is the latest and default version, while only 1.18
is available as an alternate version. For a complete list of versions of Docker soloii
that are available, see https://hub.docker.com/r/ncareol/soloii/tags/
This image provides an entrypoint
that can accept a directory as an argument.
Running the image w/ -h
or --help
as argument will display help instructions:
docker run ncareol/soloii -h
start soloii
INPUT (OPTIONAL): directory path from which to invoke soloii
Passing a directory as an argument will cause the container to cd
to that directory and then start soloii
. E.g.
docker run ncareol/soloii /data
For X11 on macOS:
Install XQuartz
Start XQuartz.
Enable X11 connections:
- Under Preferences in XQuartz, in the Security tab, ensure that the Authenticate connections and Allow connections from network clients checkboxes are selected.
Determine the IP address of the macOS host machine:
ip=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')
Provide docker run
w/ the following:
- set the
DISPLAY
for X11 w/-e
- mount the
~/.Xauthority
file as a volume w/-v
- mount a data volume w/ another
-v
- specify the Docker image,
ncareol/soloii
- optionally, specify a path to a data directory within the container, e.g.
/data
E.g.:
docker run \
-v $HOME/.Xauthority:/root/.Xauthority \
-e DISPLAY=$ip:0 \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v /Users/ej/rsf:/data \
ncareol/soloii /data
If more than one X11 server has been running, such as running both socat and XQuartz, then XQuartz may not be running on display number 0
. This can be determined by running xauth list
:
xauth list
myhost/unix:0 MIT-MAGIC-COOKIE-1 ...
myhost/unix:1 MIT-MAGIC-COOKIE-1 ...
myhost.mydomain.edu:1 MIT-MAGIC-COOKIE-1 ...
If there are entries other than :0
, the display number for one of those entries may need to be used.
XQuartz' display number can be more explicitly determined by running a more verbose series of commands:
ps -e | grep 'Xquartz :\d'|grep -v xinit
2104 ?? 0:00.00 /opt/X11/bin/Xquartz :1 -listen tcp -iglx -auth /Users/myuser/.serverauth.1955
where the entry immediately after XQuartz
specifies the display number in this example as 1
.
Based on the above examples w/ :1
, DISPLAY
would be set w/ 1
as the display number via:
-e DISPLAY=$ip:1
If soloii
fails to start and returns an error w/ message "Unable to load font %s", this can be resolved by installing the required fonts on the host.
On CentOS, RHEL-derived Linux, install ISO8859-1
packages:
sudo yum install xorg-x11-fonts-ISO8859-1-*
TODO