unimrcp in docker container

466 views
Skip to first unread message

Koushal Garg

unread,
Jun 18, 2021, 3:00:46 AM6/18/21
to UniMRCP
Hi Everyone,
      
I want to run unimrcp in a docker container. How can I do this?  Any leads or documentation will be a great help.


Thanks in Advance.

Mickael Hubert

unread,
Jun 18, 2021, 3:35:49 AM6/18/21
to uni...@googlegroups.com
Hi Koushal,
I already did that for dev purposes (but it's private gihub repo), I can share with you a part of my dockerfile and dockercompose

Dockerfile:
#docker build -f Dockerfile -t voip/unimrcp:0.1 .

#to run it DEV:
#sudo docker run --rm -i -t --name voip-unimprcp-server \
#-v  blabla:blabla \
# voip/unimrcp:0.1

FROM ubuntu:bionic

#WORKDIR /app
#ADD . /app

LABEL image_name="UniMRCP"
LABEL maintainer="HUBERT Mickael <mic...@winlux.fr>"
LABEL git_repostiory_url="***************"

ENV DEBIAN_FRONTEND noninteractive
ENV NAME unimrcp

#INSTALL DEPENDENCIES
RUN apt-get update && \
apt-get install -y wget build-essential python3 python3-dev python3-pip pkg-config git autoconf libtool automake sudo apt-utils tzdata net-tools

#ADD MODULE REPO (if you use it)
RUN echo "deb https://*******:*********@unimrcp.org/repo/apt/ bionic main" > /etc/apt/sources.list.d/unimrcp.list  && \
wget -O - https://unimrcp.org/keys/unimrcp-gpg-key.public |  apt-key add -  

RUN apt-get update

#INSTALL UNIMRCP SERVER

RUN wget -O unimrcp-deps-1-6-0-tar.gz http://www.unimrcp.org/project/component-view/unimrcp-deps-1-6-0-tar-gz/download  && \
    tar -xzvf unimrcp-deps-1-6-0-tar.gz && cd unimrcp-deps-1.6.0  && \
    ./build-dep-libs.sh -s

RUN git clone https://github.com/unispeech/unimrcp.git
RUN cd unimrcp && ./bootstrap && ./configure


RUN cd unimrcp && make && make install && ldconfig

#INSTALL KALDI MODULE (if you use it)
RUN apt-get install -y unimrcp-kaldi-sr

#ADD LICENCE for kaldi module (if you use it)
#COPY umskaldisr_*******************.lic /opt/unimrcp/data/
#COPY umskaldisr_*******************.lic /opt/unimrcp/data/

VOLUME ["/opt/unimrcp/conf"]
VOLUME ["/opt/unimrcp/data"]
WORKDIR /opt/unimrcp/bin
COPY entrypoint.sh /opt/unimrcp/bin/

#START SOFT
ENTRYPOINT ["./entrypoint.sh"]
CMD ["prod"]

entrypoint:
#!/bin/bash
/opt/unimrcp/bin/unimrcpserver -r /opt/unimrcp/ -w -o 3 -l 7

Dockercompose:
# docker-compose up --build
# docker-compose down -v
version: "3"
services:
  unimrcp:
    image: voip/unimrcp:0.1
    ports:
      - "8060:8060"
      - "1544:1544"
      #- "1554:1554"
      - "8060:8060/udp"
      - "5000-5010:5000-5010/udp"

    volumes:
      - ./develop/conf:/opt/unimrcp/conf
      - ./develop/data:/opt/unimrcp/data

#if you use modules with licences, you have to force ip address and MAC
networks: mynet: ipv4_address: 1.1.1.1 mac_address: 0E:0A:0B:0C:04:05 hostname: unimrcpsrv container_name: unimrcpsrv environment: - TZ=Europe/Paris networks: mynet: driver: bridge ipam: config: - subnet: 1.1.1.0/24

Have a good day

--
You received this message because you are subscribed to the Google Groups "UniMRCP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unimrcp+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/unimrcp/91cd3de3-8ad8-4d40-be11-44932282d5d8n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages