File size: 379 Bytes
ed40e77
 
 
68b2f03
ed40e77
 
 
2e25d6d
ed40e77
 
 
68b2f03
 
ed40e77
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
FROM python:3.9
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /code

RUN pip install fastapi requests libretranslate uvicorn[standard]==0.17.*

COPY . .
COPY --chown=user . /app
# Expose the port FastAPI will use
EXPOSE 5000

# Command to run the FastAPI app with uvicorn
CMD ["uvicorn", "main:app", "--host", "127.0.0.1", "--port", "5000"]