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.9 | |
| RUN apt install git ffmpeg -y | |
| # Set up a new user named "user" with user ID 1000 | |
| RUN useradd -m -u 1000 user | |
| RUN wget https://github.com/git-lfs/git-lfs/releases/download/v2.9.0/git-lfs-linux-amd64-v2.9.0.tar.gz | |
| RUN tar -xf git-lfs-linux-amd64-v2.9.0.tar.gz && chmod 755 install.sh && ./install.sh | |
| # 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 \ | |
| PYTHONPATH=$HOME/app \ | |
| PYTHONUNBUFFERED=1 \ | |
| GRADIO_ALLOW_FLAGGING=never \ | |
| GRADIO_NUM_PORTS=1 \ | |
| GRADIO_SERVER_NAME=0.0.0.0 \ | |
| GRADIO_THEME=huggingface \ | |
| SYSTEM=spaces | |
| # Set the working directory to the user's home directory | |
| WORKDIR $HOME | |
| RUN --mount=type=secret,id=auth,mode=0444,required=true git lfs clone https://$(cat /run/secrets/auth)@huggingface.co/spaces/cloversid/rvc-space.git | |
| # Copy the current directory contents into the container at $HOME/app setting the owner to the user | |
| RUN mv rvc-space rvc | |
| WORKDIR $HOME/rvc | |
| RUN git lfs install | |
| RUN git lfs pull | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| CMD python app.py |