tran / Dockerfile
asv7j's picture
Update Dockerfile
b0e88c9 verified
raw
history blame
384 Bytes
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 the FastAPI app and the auxiliary process in parallel
CMD ["bash", "-c", "uvicorn app:app --host 0.0.0.0 --port 7860 & python main.py --load-only hi,en"]