FROM python:3.6-slim

RUN apt-get update
# OpenCV has a LOT of dependencies.
RUN apt-get install -y \
    libglib2.0-0 \
    libsm6 \
    libxext6 \
    libswscale-dev \
    libtbb2 \
    libtbb-dev \
    libjpeg-dev \
    libpng-dev \
    libtiff-dev \
    libavformat-dev \
    libpq-dev \
    && rm -rf /var/lib/apt/lists/*

COPY requirements.txt /
RUN pip install --trusted-host pypi.python.org -r requirements.txt

WORKDIR /app

COPY . /app

# We aren't listening, just connecting, so probs won't need this.
# EXPOSE 1883
ENV PYTHONPATH=/app

CMD ["python", "DecisionSystem/CentralisedDecision/cameraserver.py", "-V", "/app/HandRecognitionMacbookFixed.mp4"]