fcfffc / Dockerfile
coollsd's picture
Create Dockerfile
62a5016 verified
raw
history blame
400 Bytes
FROM python:3.9
RUN useradd -m -u 1000 user
USER user
ENV PATH="/home/user/.local/bin:$PATH"
WORKDIR /code
COPY --chown=user ./requirements.txt /code/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
COPY --chown=user . /code/
# Use exec form of CMD for proper signal handling
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--proxy-headers"]