tran / Dockerfile
asv7j's picture
Update Dockerfile
31cb606 verified
raw
history blame contribute delete
378 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
# Expose the port FastAPI will use
EXPOSE 8000
# Command to run the FastAPI app with uvicorn
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]