Spaces:
Runtime error
Runtime error
| FROM mendelxu/pytorch:d2_nvcr_2008 | |
| docker build docker/app.Docker -t san_app | |
| docker run -it --shm-size 4G -p 7860:7860 san_app | |
| # 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 | |
| RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true | |
| # clone from the newest code. | |
| RUN ls -l $HOME/app | |
| RUN git init && git remote add origin https://github.com/MendelXu/SAN.git | |
| RUN git pull origin main | |
| # gradio | |
| RUN pip install gradio | |
| ENV GRADIO_SERVER_NAME=0.0.0.0 | |
| EXPOSE 7860 | |
| RUN echo "gradio app.py">>run.sh | |
| CMD ["script","-c","sh run.sh","/dev/null"] | |