FROM python:3.12-slim ARG WORKDIR=/app WORKDIR $WORKDIR RUN python -m pip install --upgrade pip==23.3.1 RUN apt-get update && apt-get install -y --no-install-recommends \ build-essential && \ rm -rf /var/lib/apt/lists/* COPY product_return_prediction $WORKDIR/product_return_prediction # COPY product_return_prediction/api.py $WORKDIR/product_return_prediction # COPY product_return_prediction/config.py $WORKDIR/product_return_prediction # COPY product_return_prediction/dataset.py $WORKDIR/product_return_prediction # COPY product_return_prediction/features.py $WORKDIR/product_return_prediction COPY README.md $WORKDIR/ COPY requirements.txt $WORKDIR/ COPY pyproject.toml $WORKDIR/ COPY data/external/inventory.tsv $WORKDIR/data/external/ COPY models/scaler.pkl $WORKDIR/models/ COPY models/svm.pkl $WORKDIR/models/ RUN pip install --no-cache-dir -r requirements.txt # RUN pip install --no-cache-dir . EXPOSE 7860 CMD ["uvicorn", "product_return_prediction.api:app", "--host", "0.0.0.0", "--port", "7860", "--reload"]