FROM python:3.11 WORKDIR /code COPY ./requirements.txt /code/requirements.txt COPY ./app /code/app RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt RUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudo USER docker EXPOSE 7860 CMD ["fastapi", "run", "/code/app/main.py", "--port", "7860"]