FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y \
    software-properties-common \
    gcc \
    git \
    python3.8 \
    python3-distutils \
    python3-pip \
    python3-apt

RUN python3 -m pip install --upgrade pip

RUN pip3 install django \
    djangorestframework \
    django-cors-headers \
    numpy \
    tqdm

RUN pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu

EXPOSE 8080
STOPSIGNAL SIGTERM
