File size: 355 Bytes
2feeda5
b0e88c9
 
 
2feeda5
 
 
 
 
b0e88c9
3c90a4a
 
1
2
3
4
5
6
7
8
9
10
11
12
13
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
# Start both LibreTranslate and FastAPI app in parallel
CMD ["bash", "-c", "libretranslate & uvicorn app:app --host 0.0.0.0 --port 7860"]