File size: 602 Bytes
a781d27
 
 
 
 
 
 
 
 
 
 
 
 
 
34f8bd2
 
a781d27
 
34f8bd2
 
a781d27
 
 
bd4d455
34f8bd2
 
 
 
 
 
a781d27
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
31
32
# FROM python:3.10.9

# WORKDIR /code

# RUN mkdir /code/cache

# COPY ./requirements.txt /code/requirements.txt

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

# COPY . .

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

FROM python:3.10.9

USER root

WORKDIR /code

RUN mkdir /code/cache \
    && chown -R root:root /code/cache \
    && chmod -R 777 /code/cache

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

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

COPY . .

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