Difference between revisions of "Cloud Containerization"

From SOUND4wiki
(Created)
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
The SOUND4 .CL processing can be containerized.
 
The SOUND4 .CL processing can be containerized.
  
=== General information ===
+
'''Experimental''': Images with default settings and extensions are on [https://hub.docker.com/search?q=sound4 Docker Hub]
 +
 
 +
===General information===
 
To provide the audio to the container, the easier is to use RTP to send and retrieve audio.
 
To provide the audio to the container, the easier is to use RTP to send and retrieve audio.
  
Line 10: Line 12:
 
The libraries for Linux have very little dependencies :
 
The libraries for Linux have very little dependencies :
  
* kernel >= 3.13
+
*kernel >= 5.4
* GlibC >= 2.19
+
*GlibC >= 2.31
 +
 
 +
So, using Debian>=11 or Ubuntu>=20.04 will work.
 +
 
 +
''(Versions before May 2042 need only Kernel 3.13 and glibc 2.19, so Debian 8 and Ubuntu 14.04)''
  
So, using Debian>=8 or Ubuntu>=14.04 will work.
+
If you need, you can separate the process and the user interface server, but this is not required
  
=== Special care ===
+
===Special care===
 
The distribution should have recent ca-certificates to be able to access HTTPS on the Internet, for licenses or metadata pulling.
 
The distribution should have recent ca-certificates to be able to access HTTPS on the Internet, for licenses or metadata pulling.
  
Line 22: Line 28:
 
You need to pass license information when starting the container. This can be done with environment variables or process parameters.
 
You need to pass license information when starting the container. This can be done with environment variables or process parameters.
  
You can check all available options by running the <code>sound4.''xxx''-proc</code> with <code>-h</code> to get help.
+
You can check all available options by running the <code>sound4.''xxx''-proc</code> with <code>-h</code> to get help. You can also have a look on [[.CL_Command-line_tools]].
  
=== Example for X1.CL ===
+
===Example for X1.CL===
 
Files used in image should be extracted from the matching process library archives.
 
Files used in image should be extracted from the matching process library archives.
  
==== Dockerfile ====
+
====Files====
 +
You need to get the processing libraries, and optionally the plugins' library, and extract them in the same folder as the Dockerfile, so Docker can use them.
 +
 
 +
All files are available from http://download.sound4.biz.
 +
 
 +
====Dockerfile====
 
<syntaxhighlight lang="dockerfile">
 
<syntaxhighlight lang="dockerfile">
 
FROM debian:bookworm-slim
 
FROM debian:bookworm-slim
Line 59: Line 70:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
==== Docker-compose File ====
+
====Docker-compose File====
 
<syntaxhighlight lang="yaml">
 
<syntaxhighlight lang="yaml">
 
version: '3.4'
 
version: '3.4'
Line 116: Line 127:
 
   process_storage:
 
   process_storage:
 
    
 
    
</syntaxhighlight><br />
+
</syntaxhighlight>
 +
 
 +
===Example for X1.CL with separated server===
 +
Files used in image should be extracted from the matching process library archives.
 +
 
 +
See [[Cloud Containerization#Example for X1.CL|Example for X1.CL]]  for other details.
 +
 
 +
====Dockerfile-process====
 +
<syntaxhighlight lang="dockerfile">
 +
FROM debian:bookworm-slim
 +
# install ca-certificates to access HTTPS for licenses
 +
RUN apt update \
 +
    && apt install -yq --no-install-recommends \
 +
ca-certificates \
 +
    && rm -rf /var/lib/apt/lists/*
 +
RUN mkdir -p /usr/share/sound4proc
 +
WORKDIR /
 +
# copy processing library
 +
COPY lib/libsound4.x1.cloud.so /usr/local/lib
 +
# copy processing helper executable
 +
COPY bin/sound4.x1.cloud-proc /usr/local/bin
 +
 
 +
# OPTIONAL: Kantar.CL
 +
COPY lib/libsound4.kantar.so /usr/local/lib
 +
COPY lib/libsnapliveaudioembedder.so /usr/local/lib
 +
 
 +
# OPTIONAL: Stream.CL
 +
COPY lib/libsound4.stream.so /usr/local/lib
 +
# OPTIONAL: Stream.CL scripts in share/sound4/SOUND4\ Stream.CL\ Metaparsers/
 +
COPY share/ /usr/local/share/
 +
 
 +
# force libs locate
 +
RUN ldconfig
 +
# rtp needs a logname
 +
ENV LOGNAME=sound4
 +
CMD /usr/local/bin/sound4.x1.cloud-proc
 +
 
 +
</syntaxhighlight>
 +
 
 +
====Dockerfile-server====
 +
<syntaxhighlight lang="dockerfile">
 +
FROM debian:bookworm-slim
 +
# install ca-certificates to access HTTPS for licenses
 +
RUN apt update \
 +
    && apt install -yq --no-install-recommends \
 +
ca-certificates \
 +
    && rm -rf /var/lib/apt/lists/*
 +
RUN mkdir -p /usr/share/sound4proc
 +
WORKDIR /
 +
# copy processing library
 +
COPY lib/libsound4.x1.cloud.so /usr/local/lib
 +
# copy server helper executable
 +
COPY bin/sound4.x1.cloud-server /usr/local/bin
 +
 
 +
# force libs locate
 +
RUN ldconfig
 +
 
 +
CMD /usr/local/bin/sound4.x1.cloud-server
 +
 
 +
</syntaxhighlight>
 +
 
 +
====Docker-compose File====
 +
<syntaxhighlight lang="yaml">
 +
version: '3.4'
 +
services:
 +
  server:
 +
    build:
 +
      context: .
 +
      dockerfile: Dockerfile-server
 +
    depends_on:
 +
      - process
 +
    restart: unless-stopped
 +
    ports:
 +
      - "${HTTP_PORT:-80}:80"
 +
  environment:
 +
      - HTTP_PORT=80
 +
      - PROC_IP=process
 +
      - PROC_PORT=5010
 +
  process:
 +
    build:
 +
      context: .
 +
      dockerfile: Dockerfile-process
 +
    restart: unless-stopped
 +
    ports:
 +
      - "${RTP_SRC_PORT:-5004}:${RTP_SRC_PORT:-5004}/udp"
 +
    volumes:
 +
      - process_storage:/usr/share/sound4proc
 +
    command: [
 +
        "/usr/local/bin/sound4.x1.cloud-proc"
 +
        # You can get the full command line options by running the program with -h
 +
 
 +
        # For Kantar, disable usage of offline licenses in cloud solutions
 +
        , "-a", "KANTAR_OfflineLicense=0"
 +
        # , "-a", "KANTAR_LicPath=/usr/share/sound4lic"
 +
        # For Kantar, you may force KANTAR_Login, KANTAR_Password, KANTAR_LicenseName and KANTAR_ChannelName
 +
        # For stream, known metadata parsers
 +
        , "-a", "Metadata_provided_path=/usr/local/share/sound4/SOUND4 Stream.CL Metaparsers"
 +
        # For stream, if you want no metadata management in UI, set to 1
 +
        , "-a", "Metadata_no_ui=0"
 +
    ]
 +
    environment:
 +
      # where to save, internally
 +
      - STATE_DIR=/usr/share/sound4proc
 +
      # RTP/UDP listening specific IP (use for broadcast) or Livewire channel in
 +
      # use 0 to receive directly RTP (no Livewire)
 +
      - RTP_SRC_IP=${RTP_SRC_IP:-0}
 +
      - RTP_SRC_PORT=${RTP_SRC_PORT:-5004}
 +
      # Send back to this IP or Livewire channel
 +
      - RTP_DEST_IP=${RTP_DEST_IP:-x.x.x.x}
 +
      - RTP_DEST_PORT=${RTP_DEST_PORT:-5004}
 +
      - PROC_VERB=${PROC_VERB:-}
 +
      # Choose sample format in S16_LE, S16_BE, S24_LE, S24_BE, S32_LE, S32_BE, F32_LE, F32_BE
 +
      - RTP_SAMPLE_FORMAT=${RTP_SAMPLE_FORMAT:-S16_BE}
 +
      # receive/send RTP payload. NOTE: payload 97 allows to receive payload 96 or 97, to ease compatibility.
 +
      - RTP_PAYLOAD=${RTP_PAYLOAD:-97}
 +
      # Audio frames Per Output Packet
 +
      - RTP_FRAMES=${RTP_FRAMES:-64}
 +
      # Port for server
 +
      - PROC_PORT=5010
 +
      # Setup/Admin user: see doc
 +
      - SETUP_USER=${SETUP_USER:-}
 +
      - SETUP_SECRET=${SETUP_SECRET:-}
 +
      - ADMIN_USER=${ADMIN_USER:-}
 +
      - ADMIN_SECRET=${ADMIN_SECRET:-}
 +
      # IDs for the licence SOUND4 gave you
 +
      - S4LOGINKEY=${S4LOGINKEY:-xxxxxxxx}
 +
      - RADIO_NAME=${RADIO_NAME:-}
 +
      - S4_AWS_ACCESS_KEY_ID=${S4_AWS_ACCESS_KEY_ID:-}
 +
      - S4_AWS_SECRET_ACCESS_KEY=${S4_AWS_SECRET_ACCESS_KEY:-}
 +
volumes:
 +
  process_storage:
 +
 
 +
</syntaxhighlight>
 +
 
 +
===Impact.CL===
 +
This exactly the same as X1.CL, replacing <code>sound4.x1.cloud</code> by <code>sound4.impact.cl</code>.
 +
 
 +
See [[Cloud Containerization#Example for X1.CL|Example for X1.CL]]  for details.
 +
 
 +
===Bigvoice.CL===
 +
This exactly the same as X1.CL, replacing <code>sound4.x1.cloud</code> by <code>sound4.bigvoice.cl</code>. You can remove all Kantar and Stream extension's specific, as they are not used in BigVoice.CL.
 +
 
 +
See [[Cloud Containerization#Example for X1.CL|Example for X1.CL]]  for details.
 +
 
 +
====Dockerfile====
 +
<syntaxhighlight lang="dockerfile">
 +
FROM debian:bookworm-slim
 +
# install ca-certificates to access HTTPS for licenses
 +
RUN apt update \
 +
    && apt install -yq --no-install-recommends \
 +
ca-certificates \
 +
    && rm -rf /var/lib/apt/lists/*
 +
RUN mkdir -p /usr/share/sound4proc
 +
WORKDIR /
 +
# copy processing library
 +
COPY lib/libsound4.bigvoice.cl.so /usr/local/lib
 +
# copy processing helper executable
 +
COPY bin/sound4.bigvoice.cl-proc /usr/local/bin
 +
 
 +
# force libs locate
 +
RUN ldconfig
 +
# rtp needs a logname
 +
ENV LOGNAME=sound4
 +
CMD /usr/local/bin/sound4.bigvoice.cl-proc
 +
 
 +
</syntaxhighlight>
 +
 
 +
====Docker-compose File====
 +
<syntaxhighlight lang="yaml">
 +
version: '3.4'
 +
services:
 +
  process:
 +
    build: .
 +
    restart: unless-stopped
 +
    ports:
 +
    - "${RTP_SRC_PORT:-5004}:${RTP_SRC_PORT:-5004}/udp"
 +
    - "${HTTP_PORT:-80}:${HTTP_PORT:-80}"
 +
    volumes:
 +
    - process_storage:/usr/share/sound4proc
 +
    environment:
 +
      # where to save, internally
 +
      - STATE_DIR=/usr/share/sound4proc
 +
      # RTP/UDP listening specific IP (use for broadcast) or Livewire channel in
 +
      # use 0 to receive directly RTP (no Livewire)
 +
      - RTP_SRC_IP=${RTP_SRC_IP:-0}
 +
      - RTP_SRC_PORT=${RTP_SRC_PORT:-5004}
 +
      # Send back to this IP or Livewire channel
 +
      - RTP_DEST_IP=${RTP_DEST_IP:-x.x.x.x}
 +
      - RTP_DEST_PORT=${RTP_DEST_PORT:-5004}
 +
      - PROC_VERB=${PROC_VERB:-}
 +
      # Choose sample format in S16_LE, S16_BE, S24_LE, S24_BE, S32_LE, S32_BE, F32_LE, F32_BE
 +
      - RTP_SAMPLE_FORMAT=${RTP_SAMPLE_FORMAT:-S16_BE}
 +
      # receive/send RTP payload. NOTE: payload 97 allows to receive payload 96 or 97, to ease compatibility.
 +
      - RTP_PAYLOAD=${RTP_PAYLOAD:-97}
 +
      # Audio frames Per Output Packet
 +
      - RTP_FRAMES=${RTP_FRAMES:-64}
 +
      # Port for HTTP
 +
      - HTTP_PORT=${HTTP_PORT:-80}
 +
      # Setup/Admin user: see doc
 +
      - SETUP_USER=${SETUP_USER:-}
 +
      - SETUP_SECRET=${SETUP_SECRET:-}
 +
      - ADMIN_USER=${ADMIN_USER:-}
 +
      - ADMIN_SECRET=${ADMIN_SECRET:-}
 +
      # IDs for the licence SOUND4 gave you
 +
      - S4LOGINKEY=${S4LOGINKEY:-xxxxxxxx}
 +
      - RADIO_NAME=${RADIO_NAME:-}
 +
      - S4_AWS_ACCESS_KEY_ID=${S4_AWS_ACCESS_KEY_ID:-}
 +
      - S4_AWS_SECRET_ACCESS_KEY=${S4_AWS_SECRET_ACCESS_KEY:-}
 +
volumes:
 +
  process_storage:
 +
 
 +
</syntaxhighlight>
 +
 
 +
[[Category:Cloud]]

Latest revision as of 08:04, 24 July 2024

The SOUND4 .CL processing can be containerized.

Experimental: Images with default settings and extensions are on Docker Hub

General information

To provide the audio to the container, the easier is to use RTP to send and retrieve audio.

You can use the sound4.xxx-proc program contained in the archive to create the process using the dynamic library.

For X1.CL and IMPACT.CL, you can add extensions (Kantar.CL and Stream.CL) in the container to have them available.

The libraries for Linux have very little dependencies :

  • kernel >= 5.4
  • GlibC >= 2.31

So, using Debian>=11 or Ubuntu>=20.04 will work.

(Versions before May 2042 need only Kernel 3.13 and glibc 2.19, so Debian 8 and Ubuntu 14.04)

If you need, you can separate the process and the user interface server, but this is not required

Special care

The distribution should have recent ca-certificates to be able to access HTTPS on the Internet, for licenses or metadata pulling.

The configuration storage should be in a volume to keep presets and configuration upon upgrades.

You need to pass license information when starting the container. This can be done with environment variables or process parameters.

You can check all available options by running the sound4.xxx-proc with -h to get help. You can also have a look on .CL_Command-line_tools.

Example for X1.CL

Files used in image should be extracted from the matching process library archives.

Files

You need to get the processing libraries, and optionally the plugins' library, and extract them in the same folder as the Dockerfile, so Docker can use them.

All files are available from http://download.sound4.biz.

Dockerfile

FROM debian:bookworm-slim
# install ca-certificates to access HTTPS for licenses
RUN apt update \
    && apt install -yq --no-install-recommends \
		ca-certificates \
    && rm -rf /var/lib/apt/lists/*
RUN mkdir -p /usr/share/sound4proc
WORKDIR /
# copy processing library
COPY lib/libsound4.x1.cloud.so /usr/local/lib
# copy processing helper executable
COPY bin/sound4.x1.cloud-proc /usr/local/bin

# OPTIONAL: Kantar.CL
COPY lib/libsound4.kantar.so /usr/local/lib
COPY lib/libsnapliveaudioembedder.so /usr/local/lib

# OPTIONAL: Stream.CL
COPY lib/libsound4.stream.so /usr/local/lib
# OPTIONAL: Stream.CL scripts in share/sound4/SOUND4\ Stream.CL\ Metaparsers/
COPY share/ /usr/local/share/

# force libs locate
RUN ldconfig
# rtp needs a logname
ENV LOGNAME=sound4
CMD /usr/local/bin/sound4.x1.cloud-proc

Docker-compose File

version: '3.4'
services:
  process:
    build: .
    restart: unless-stopped
    ports:
     - "${RTP_SRC_PORT:-5004}:${RTP_SRC_PORT:-5004}/udp"
     - "${HTTP_PORT:-80}:${HTTP_PORT:-80}"
    volumes:
     - process_storage:/usr/share/sound4proc
    command: [
        "/usr/local/bin/sound4.x1.cloud-proc"
        # You can get the full command line options by running the program with -h

        # For Kantar, disable usage of offline licenses in cloud solutions
        , "-a", "KANTAR_OfflineLicense=0"
        # , "-a", "KANTAR_LicPath=/usr/share/sound4lic"
        # For Kantar, you may force KANTAR_Login, KANTAR_Password, KANTAR_LicenseName and KANTAR_ChannelName
        # For stream, known metadata parsers
        , "-a", "Metadata_provided_path=/usr/local/share/sound4/SOUND4 Stream.CL Metaparsers"
        # For stream, if you want no metadata management in UI, set to 1
        , "-a", "Metadata_no_ui=0"
    ]
    environment:
      # where to save, internally
      - STATE_DIR=/usr/share/sound4proc
      # RTP/UDP listening specific IP (use for broadcast) or Livewire channel in
      # use 0 to receive directly RTP (no Livewire)
      - RTP_SRC_IP=${RTP_SRC_IP:-0}
      - RTP_SRC_PORT=${RTP_SRC_PORT:-5004}
      # Send back to this IP or Livewire channel
      - RTP_DEST_IP=${RTP_DEST_IP:-x.x.x.x}
      - RTP_DEST_PORT=${RTP_DEST_PORT:-5004}
      - PROC_VERB=${PROC_VERB:-}
      # Choose sample format in S16_LE, S16_BE, S24_LE, S24_BE, S32_LE, S32_BE, F32_LE, F32_BE
      - RTP_SAMPLE_FORMAT=${RTP_SAMPLE_FORMAT:-S16_BE}
      # receive/send RTP payload. NOTE: payload 97 allows to receive payload 96 or 97, to ease compatibility.
      - RTP_PAYLOAD=${RTP_PAYLOAD:-97}
      # Audio frames Per Output Packet
      - RTP_FRAMES=${RTP_FRAMES:-64}
      # Port for HTTP
      - HTTP_PORT=${HTTP_PORT:-80}
      # Setup/Admin user: see doc
      - SETUP_USER=${SETUP_USER:-}
      - SETUP_SECRET=${SETUP_SECRET:-}
      - ADMIN_USER=${ADMIN_USER:-}
      - ADMIN_SECRET=${ADMIN_SECRET:-}
      # IDs for the licence SOUND4 gave you
      - S4LOGINKEY=${S4LOGINKEY:-xxxxxxxx}
      - RADIO_NAME=${RADIO_NAME:-}
      - S4_AWS_ACCESS_KEY_ID=${S4_AWS_ACCESS_KEY_ID:-}
      - S4_AWS_SECRET_ACCESS_KEY=${S4_AWS_SECRET_ACCESS_KEY:-}
volumes:
  process_storage:

Example for X1.CL with separated server

Files used in image should be extracted from the matching process library archives.

See Example for X1.CL for other details.

Dockerfile-process

FROM debian:bookworm-slim
# install ca-certificates to access HTTPS for licenses
RUN apt update \
    && apt install -yq --no-install-recommends \
		ca-certificates \
    && rm -rf /var/lib/apt/lists/*
RUN mkdir -p /usr/share/sound4proc
WORKDIR /
# copy processing library
COPY lib/libsound4.x1.cloud.so /usr/local/lib
# copy processing helper executable
COPY bin/sound4.x1.cloud-proc /usr/local/bin

# OPTIONAL: Kantar.CL
COPY lib/libsound4.kantar.so /usr/local/lib
COPY lib/libsnapliveaudioembedder.so /usr/local/lib

# OPTIONAL: Stream.CL
COPY lib/libsound4.stream.so /usr/local/lib
# OPTIONAL: Stream.CL scripts in share/sound4/SOUND4\ Stream.CL\ Metaparsers/
COPY share/ /usr/local/share/

# force libs locate
RUN ldconfig
# rtp needs a logname
ENV LOGNAME=sound4
CMD /usr/local/bin/sound4.x1.cloud-proc

Dockerfile-server

FROM debian:bookworm-slim
# install ca-certificates to access HTTPS for licenses
RUN apt update \
    && apt install -yq --no-install-recommends \
		ca-certificates \
    && rm -rf /var/lib/apt/lists/*
RUN mkdir -p /usr/share/sound4proc
WORKDIR /
# copy processing library
COPY lib/libsound4.x1.cloud.so /usr/local/lib
# copy server helper executable
COPY bin/sound4.x1.cloud-server /usr/local/bin

# force libs locate
RUN ldconfig

CMD /usr/local/bin/sound4.x1.cloud-server

Docker-compose File

version: '3.4'
services:
  server:
    build:
      context: .
      dockerfile: Dockerfile-server
    depends_on:
      - process
    restart: unless-stopped
    ports:
      - "${HTTP_PORT:-80}:80"
   environment:
      - HTTP_PORT=80
      - PROC_IP=process
      - PROC_PORT=5010
  process:
    build:
      context: .
      dockerfile: Dockerfile-process
    restart: unless-stopped
    ports:
      - "${RTP_SRC_PORT:-5004}:${RTP_SRC_PORT:-5004}/udp"
    volumes:
      - process_storage:/usr/share/sound4proc
    command: [
        "/usr/local/bin/sound4.x1.cloud-proc"
        # You can get the full command line options by running the program with -h

        # For Kantar, disable usage of offline licenses in cloud solutions
        , "-a", "KANTAR_OfflineLicense=0"
        # , "-a", "KANTAR_LicPath=/usr/share/sound4lic"
        # For Kantar, you may force KANTAR_Login, KANTAR_Password, KANTAR_LicenseName and KANTAR_ChannelName
        # For stream, known metadata parsers
        , "-a", "Metadata_provided_path=/usr/local/share/sound4/SOUND4 Stream.CL Metaparsers"
        # For stream, if you want no metadata management in UI, set to 1
        , "-a", "Metadata_no_ui=0"
    ]
    environment:
      # where to save, internally
      - STATE_DIR=/usr/share/sound4proc
      # RTP/UDP listening specific IP (use for broadcast) or Livewire channel in
      # use 0 to receive directly RTP (no Livewire)
      - RTP_SRC_IP=${RTP_SRC_IP:-0}
      - RTP_SRC_PORT=${RTP_SRC_PORT:-5004}
      # Send back to this IP or Livewire channel
      - RTP_DEST_IP=${RTP_DEST_IP:-x.x.x.x}
      - RTP_DEST_PORT=${RTP_DEST_PORT:-5004}
      - PROC_VERB=${PROC_VERB:-}
      # Choose sample format in S16_LE, S16_BE, S24_LE, S24_BE, S32_LE, S32_BE, F32_LE, F32_BE
      - RTP_SAMPLE_FORMAT=${RTP_SAMPLE_FORMAT:-S16_BE}
      # receive/send RTP payload. NOTE: payload 97 allows to receive payload 96 or 97, to ease compatibility.
      - RTP_PAYLOAD=${RTP_PAYLOAD:-97}
      # Audio frames Per Output Packet
      - RTP_FRAMES=${RTP_FRAMES:-64}
      # Port for server
      - PROC_PORT=5010
      # Setup/Admin user: see doc
      - SETUP_USER=${SETUP_USER:-}
      - SETUP_SECRET=${SETUP_SECRET:-}
      - ADMIN_USER=${ADMIN_USER:-}
      - ADMIN_SECRET=${ADMIN_SECRET:-}
      # IDs for the licence SOUND4 gave you
      - S4LOGINKEY=${S4LOGINKEY:-xxxxxxxx}
      - RADIO_NAME=${RADIO_NAME:-}
      - S4_AWS_ACCESS_KEY_ID=${S4_AWS_ACCESS_KEY_ID:-}
      - S4_AWS_SECRET_ACCESS_KEY=${S4_AWS_SECRET_ACCESS_KEY:-}
volumes:
  process_storage:

Impact.CL

This exactly the same as X1.CL, replacing sound4.x1.cloud by sound4.impact.cl.

See Example for X1.CL for details.

Bigvoice.CL

This exactly the same as X1.CL, replacing sound4.x1.cloud by sound4.bigvoice.cl. You can remove all Kantar and Stream extension's specific, as they are not used in BigVoice.CL.

See Example for X1.CL for details.

Dockerfile

FROM debian:bookworm-slim
# install ca-certificates to access HTTPS for licenses
RUN apt update \
    && apt install -yq --no-install-recommends \
		ca-certificates \
    && rm -rf /var/lib/apt/lists/*
RUN mkdir -p /usr/share/sound4proc
WORKDIR /
# copy processing library
COPY lib/libsound4.bigvoice.cl.so /usr/local/lib
# copy processing helper executable
COPY bin/sound4.bigvoice.cl-proc /usr/local/bin

# force libs locate
RUN ldconfig
# rtp needs a logname
ENV LOGNAME=sound4
CMD /usr/local/bin/sound4.bigvoice.cl-proc

Docker-compose File

version: '3.4'
services:
  process:
    build: .
    restart: unless-stopped
    ports:
     - "${RTP_SRC_PORT:-5004}:${RTP_SRC_PORT:-5004}/udp"
     - "${HTTP_PORT:-80}:${HTTP_PORT:-80}"
    volumes:
     - process_storage:/usr/share/sound4proc
    environment:
      # where to save, internally
      - STATE_DIR=/usr/share/sound4proc
      # RTP/UDP listening specific IP (use for broadcast) or Livewire channel in
      # use 0 to receive directly RTP (no Livewire)
      - RTP_SRC_IP=${RTP_SRC_IP:-0}
      - RTP_SRC_PORT=${RTP_SRC_PORT:-5004}
      # Send back to this IP or Livewire channel
      - RTP_DEST_IP=${RTP_DEST_IP:-x.x.x.x}
      - RTP_DEST_PORT=${RTP_DEST_PORT:-5004}
      - PROC_VERB=${PROC_VERB:-}
      # Choose sample format in S16_LE, S16_BE, S24_LE, S24_BE, S32_LE, S32_BE, F32_LE, F32_BE
      - RTP_SAMPLE_FORMAT=${RTP_SAMPLE_FORMAT:-S16_BE}
      # receive/send RTP payload. NOTE: payload 97 allows to receive payload 96 or 97, to ease compatibility.
      - RTP_PAYLOAD=${RTP_PAYLOAD:-97}
      # Audio frames Per Output Packet
      - RTP_FRAMES=${RTP_FRAMES:-64}
      # Port for HTTP
      - HTTP_PORT=${HTTP_PORT:-80}
      # Setup/Admin user: see doc
      - SETUP_USER=${SETUP_USER:-}
      - SETUP_SECRET=${SETUP_SECRET:-}
      - ADMIN_USER=${ADMIN_USER:-}
      - ADMIN_SECRET=${ADMIN_SECRET:-}
      # IDs for the licence SOUND4 gave you
      - S4LOGINKEY=${S4LOGINKEY:-xxxxxxxx}
      - RADIO_NAME=${RADIO_NAME:-}
      - S4_AWS_ACCESS_KEY_ID=${S4_AWS_ACCESS_KEY_ID:-}
      - S4_AWS_SECRET_ACCESS_KEY=${S4_AWS_SECRET_ACCESS_KEY:-}
volumes:
  process_storage: