Spaces:
Sleeping
Sleeping
File size: 556 Bytes
53ef3bd 7ad5bd0 53ef3bd 7ad5bd0 53ef3bd 7ad5bd0 c031c26 53ef3bd c031c26 |
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 29 30 |
FROM python:3.10-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN useradd -m -u 1000 user
WORKDIR /app
COPY requirements.txt .
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --upgrade pip && \
pip install -r requirements.txt
COPY . .
USER user
ENV HOME=/home/user \
PATH=/home/user/.local/bin:$PATH
WORKDIR $HOME/app
COPY --chown=user . $HOME/app
ENV PORT=8000
EXPOSE $PORT
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"] |