File size: 537 Bytes
cb62305
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM python:3.9

RUN useradd -m -u 1000 user

WORKDIR /code

COPY ./requirements.txt /code/requirements.txt
COPY ./requirements_nodeps.txt /code/requirements_nodeps.txt

USER root
RUN chown -R user:user /code

USER user

RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements_nodeps.txt --no-deps

# RUN pip show uvicorn

COPY --chown=user:user . /code

ENV PATH="/home/user/.local/bin:${PATH}"

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