# This is meant to turn a pip requirements.txt file into a container. To be used like:
# docker build -t image_name:tag --build-arg ENV_FILE=requirements.txt --build-arg PYTHON_IMAGE=python:3.10-slim-bullseye -f src/meadowrun/docker_files/PipDockerfile .
# This assumes that ./requirements.txt exists and defines the environment

ARG PYTHON_IMAGE

FROM $PYTHON_IMAGE

ENV PIP_NO_CACHE_DIR=1 \
    PIP_DISABLE_PIP_VERSION_CHECK=1

WORKDIR /tmp/

ARG ENV_FILE

COPY $ENV_FILE ./
RUN python -m pip install -r $ENV_FILE
