Spaces:
Running
Running
File size: 857 Bytes
4f87296 5e68d3e 4f87296 5e68d3e 4f87296 5e68d3e 4f87296 5c86c83 4f87296 b2a1ec2 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | # 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
COPY --chown=user . /app
EXPOSE 7860
CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port ${PORT:-7860} --workers 4 --log-level info"]
|