# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker # you will also find guides on how best to write your Dockerfile FROM python:3.10 WORKDIR /code COPY ./requirements_part1.txt /code/requirements_part1.txt COPY ./requirements_part2.txt /code/requirements_part2.txt RUN apt-get update -y && \ apt-get upgrade -y && \ apt-get install -y libglfw3-dev && \ apt-get install -y libgles2-mesa-dev && \ apt-get install -y aria2 && \ pip install --no-cache-dir --upgrade -r /code/requirements_part1.txt && \ pip install --no-cache-dir --upgrade -r /code/requirements_part2.txt # 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 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 ["bash", "tools/start.sh"]