FROM python:3.11.2-slim

ENV PYTHONUNBUFFERED=1 \
    PYTHONHASHSEED=0 \
    PIP_NO_CACHE_DIR=1 \
    OMP_NUM_THREADS=1 \
    MKL_NUM_THREADS=1 \
    OPENBLAS_NUM_THREADS=1

WORKDIR /workspace

RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    gcc \
    g++ \
    && rm -rf /var/lib/apt/lists/*

COPY code/requirements.txt /workspace/requirements.txt

RUN pip install --upgrade pip setuptools wheel \
    && pip install -r /workspace/requirements.txt

COPY code/ /workspace/

CMD ["bash"]
