FROM python:3.10.12 #FIXING PERMISSION ISSUES # Set up a new user named "user" with user ID 1000 RUN useradd -m -u 1000 user # Switch to the "user" user USER user # Set home to the user's home dir ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH WORKDIR $HOME/code COPY ./requirements.txt /code/requirements.txt RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt COPY --chown=user . $HOME/code CMD ["gunicorn", "-b", "0.0.0.0:7860", "my_web_app:app", "-t", "600"]