Skip to content

Docker usage

Below are examples for using the spectral-data-converter library via its Docker images.

Interactive session#

The following command starts an interactive session, mapping the current working directory to /workspace:

docker run --rm -u $(id -u):$(id -g) \
    -v `pwd`:/workspace \
    -it waikatodatamining/spectral-data-converter:latest

Conversion pipeline#

The following converts an spectra in ADAMS format to ASC format:

docker run --rm -u $(id -u):$(id -g) \
    -v `pwd`:/workspace \
    -it waikatodatamining/spectral-data-converter:latest \
    sdc-convert -l INFO \
      from-adams \
        -l INFO \
        -i /workspace/input/*.spec \
      to-asc \
        -l INFO \
        -o /workspace/output

NB: The input and output directories are located below the current working directory (pwd).