FROM python:3.11-slim

WORKDIR /service

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

COPY . .

VOLUME /models

EXPOSE 8000/tcp

ENV MODELS_PATH=/models

CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]

# docker build -t ml_service:2 services/ml_service/
# docker run -v "$(pwd)/services/models:/models" -p 8000:8000 ml_service:2
