File size: 505 Bytes
8350b58
 
 
f33a809
 
 
8350b58
 
 
f33a809
8350b58
f33a809
8350b58
f33a809
 
8350b58
 
 
f33a809
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
RUN useradd -m -u 1000 user
USER user

# Get the image of python
FROM python:3.9

# Set the current directory as working dir
WORKDIR /code

# Copy all the files from local-dir to machine dir
COPY ./requirements.txt /code/requirements.txt

RUN chown -R user:user /code

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

COPY --chown=user:user . /code

# Launch the server
CMD ["uvicorn", "backend:app", "--host", "0.0.0.0", "--port", "7860"]