## Based on https://huggingface.co/spaces/sayakpaul/demo-docker-gradio/blob/main/Dockerfile FROM seipharos/pharos WORKDIR /code COPY ./requirements.txt /code/requirements.txt RUN apt-get -y update && apt-get -y install python3-pip RUN cat /etc/passwd # Switch to the "user" user USER ubuntu 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/ubuntu \ PATH=/home/ubuntu/.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=ubuntu . $HOME/app CMD ["python3", "app.py"]