Spaces:
Build error
Build error
| # 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 | |
| USER root | |
| # Set the working directory to the user's home directory | |
| WORKDIR $HOME/app | |
| # Try and run pip command after setting the user with `USER user` to avoid permission issues with Python | |
| RUN pip install --no-cache-dir --upgrade pip | |
| # Copy the current directory contents into the container at $HOME/app setting the owner to the user | |
| COPY --chown=user . $HOME/app | |
| RUN pip install --no-cache-dir --upgrade -r requirements.txt | |
| RUN chmod 777 ./* | |
| RUN chmod 777 /usr/local/lib/python3.10/site-packages/mercury/* | |
| ENV MEDIA_ROOT ./media | |
| CMD ["mkdir", "-p", "media"] | |
| CMD ["mercury", "run", "7860"] | |