## Based on https://huggingface.co/spaces/sayakpaul/demo-docker-gradio/blob/main/Dockerfile #FROM seipharos/pharos FROM seipharos/justkidding WORKDIR /code COPY ./requirements.txt /code/requirements.txt RUN apt-get -y update && apt-get -y install python3-pip RUN cat /etc/passwd # Set up a new user named "user" RUN useradd -m user # Switch to the "user" user USER user RUN pip3 install --break-system-packages --no-cache-dir --upgrade setuptools pip RUN pip3 install --break-system-packages --no-cache-dir --upgrade -r /code/requirements.txt # Set home to the user's home directory ENV HOME=/home/user \ PATH=/home/user/.local/bin:$PATH # Set the working directory to the user's home directory WORKDIR $HOME/app # Copy the current directory contents into the container at $HOME/app setting the owner to the user COPY --chown=user . $HOME/app CMD ["python3", "app.py"]