insightfy-bms-ms-ums / Dockerfile
MukeshKapoor25's picture
docker fix
4adf9ee
raw
history blame contribute delete
906 Bytes
# Use a lightweight and stable Python 3.11 base image (Bullseye)
FROM python:3.11-slim-bullseye AS base
ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PATH="/home/user/.local/bin:$PATH"
RUN apt-get update && apt-get install -y \
openssl \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
RUN useradd -m -u 1000 user
USER user
WORKDIR /app
COPY --chown=user ./requirements.txt requirements.txt
COPY --chown=user ./app/insightfy_utils-0.1.0-py3-none-any.whl insightfy_utils-0.1.0-py3-none-any.whl
RUN pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir insightfy_utils-0.1.0-py3-none-any.whl && \
pip install --no-cache-dir --upgrade -r requirements.txt
RUN python -m spacy download en_core_web_sm
COPY --chown=user . /app
EXPOSE 7860
CMD ["uvicorn", "app.app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "4", "--log-level", "info"]