File size: 690 Bytes
37e145d
 
 
 
 
 
 
 
 
 
 
 
 
d4a3b21
f480abf
a6254c4
37e145d
d4a3b21
 
37e145d
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
FROM mendelxu/pytorch:d2_nvcr_2008

# 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"]