Spaces:
Runtime error
Runtime error
MendelXu
commited on
Commit
·
37e145d
1
Parent(s):
2b8941c
init
Browse files- Dockerfile +23 -0
- README.md +4 -4
Dockerfile
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM mendelxu/pytorch:d2_nvcr_2008
|
2 |
+
|
3 |
+
# Set up a new user named "user" with user ID 1000
|
4 |
+
RUN useradd -m -u 1000 user
|
5 |
+
# Switch to the "user" user
|
6 |
+
USER user
|
7 |
+
# Set home to the user's home directory
|
8 |
+
ENV HOME=/home/user \
|
9 |
+
PATH=/home/user/.local/bin:$PATH
|
10 |
+
|
11 |
+
# Set the working directory to the user's home directory
|
12 |
+
WORKDIR $HOME/app
|
13 |
+
|
14 |
+
RUN --mount=type=secret,id=HF_TOKEN,mode=0444,required=true
|
15 |
+
RUN --mount=type=secret,id=git_repo,mode=0444,required=true \
|
16 |
+
git init && \
|
17 |
+
git remote add origin $(cat /run/secrets/git_repo)
|
18 |
+
RUN git pull origin main
|
19 |
+
RUN pip install gradio
|
20 |
+
ENV GRADIO_SERVER_NAME=0.0.0.0
|
21 |
+
EXPOSE 7860
|
22 |
+
RUN echo "gradio app.py">>run.sh
|
23 |
+
CMD ["script","-c","sh run.sh","/dev/null"]
|
README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
---
|
2 |
-
title:
|
3 |
-
emoji:
|
4 |
-
colorFrom:
|
5 |
-
colorTo:
|
6 |
sdk: docker
|
7 |
pinned: false
|
8 |
license: mit
|
|
|
1 |
---
|
2 |
+
title: San Demo
|
3 |
+
emoji: 💻
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: purple
|
6 |
sdk: docker
|
7 |
pinned: false
|
8 |
license: mit
|