## 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 # Set up a new user named "user" RUN useradd -m user -u 1000 -o # 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"]