

FROM ubuntu:22.04

# this is for timezone config
ENV DEBIAN_FRONTEND=noninteractive 
ENV TZ=America/Toronto
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone


#-y is for accepting yes when the system asked us for installing the package
RUN apt-get update && \
    apt-get install -y build-essential cmake git gdb pkg-config valgrind systemd-coredump python3 python3-opencv libopencv-dev python3-pip python3-dev && \ 
    apt-get -y clean && apt-get -y autoremove

RUN python3 -m pip install --upgrade pip

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

RUN pip3 install datasets && pip3 install jupyter notebook && pip3 install matplotlib

RUN pip3 install easyocr && pip3 uninstall -y opencv-python-headless

ENV HF_DATASETS_CACHE="/mnt/code/.cache/datasets"
ENV TORCH_HOME="/mnt/code/.cache/torch"


