Dockerfile 2.45 KB
FROM ubuntu:14.04
MAINTAINER Jonathan Brilhante
#Container para o Core

#Dependencies installation - RabbitMQ / Graylog / Nodejs / Redis / MongoDB / FFmpeg

#Packages updates
RUN apt-get -y upgrade
RUN apt-get -y update

#Install necessary packages
RUN apt-get install -y build-essential libssl-dev sudo curl wget && apt-get clean

#Install python packages
RUN apt-get install -y python python-setuptools && apt-get clean &&  easy_install pip

#Install python and python lib for RabbitMQ
RUN pip install pika

#Install Graylog
RUN pip install graypy
RUN pip install graypy[amqp]

#Install aditional packages
RUN apt-get install -y pkg-config libfreetype6-dev libpng-dev xvfb python-yaml libgomp1 python-numpy python-pyfits python-matplotlib idle && apt-get clean
RUN pip install nltk==3.0.5 nltk_tgrep --upgrade
RUN pip install pysrt pyvirtualdisplay
RUN apt-get install -y software-properties-common && apt-get clean

#Install FFmpeg
RUN add-apt-repository ppa:mc3man/trusty-media
RUN apt-get -y update
RUN apt-get install -y ffmpeg gstreamer0.10-ffmpeg && apt-get clean

#RUN useradd -ms /bin/bash  vlibras
#WORKDIR /
RUN mkdir /storage/
#RUN mkdir /home/vlibras/
#RUN chown -R vlibras /storage/
#RUN chown -R vlibras /home/vlibras/
#USER vlibras

#Copy workers to container
WORKDIR /root/
ADD ./extractor.py /root/extractor.py
ADD ./mixer.py /root/mixer.py
ADD ./renderer.py /root/renderer.py
ADD ./translator.py /root/translator.py
ADD ./PikaManager.py /root/PikaManager.py
ADD ./processManager.py /root/processManager.py
ADD ./log/ /root/log/
ADD ./unityVideo/ /root/unityVideo/
ADD ./vlibras-translate/ /root/vlibras-translate/
ADD ./vlibras-libs/ /root/vlibras-libs/

#Workers environment variables
ENV VLIBRAS_VIDEO_CREATOR="/root/unityVideo/videoCreator.x86_64"
ENV VLIBRAS_VIDEO_LIBRAS="/storage/libras"
ENV VLIBRAS_VIDEO_MIXED="/storage/videos"
ENV VLIBRAS_VIDEO_SCREENS="/storage/frames"

#Translator environment variables
ENV HUNPOS_TAGGER="/root/vlibras-libs/aelius/bin/hunpos-tag"
ENV AELIUS_DATA="/root/vlibras-libs/aelius/aelius_data"
ENV TRANSLATE_DATA="/root/vlibras-translate/data"
ENV NLTK_DATA="/root/vlibras-libs/aelius/nltk_data"
ENV PYTHONPATH=":/root/vlibras-libs/aelius:/root/vlibras-translate/src:/root/vlibras-libs/aelius:/root/vlibras-translate/src"
#ENV NODE_PATH=/home/vlibras/vlibras-api/node_modules/;%NODE_PATH%

#Comando de entrada quando inicializado
ENTRYPOINT sleep 1m ; python /root/processManager.py