FROM tensorflow/tensorflow:latest-gpu

WORKDIR /app

RUN apt-get update && apt-get install -y ffmpeg poppler-utils

COPY requirements.txt .
RUN pip install --upgrade pip
RUN pip install --no-cache-dir --upgrade -r requirements.txt

RUN pip install --upgrade jupyter notebook jupyterlab

RUN apt install -y graphviz

ARG USER_ID
ARG USER_NAME
ARG GROUP_ID

RUN adduser -u ${USER_ID} ${USER_NAME}

USER ${USER_ID}:${GROUP_ID}

COPY . .
