Spaces:
Running
on
T4
Running
on
T4
praeclarumjj3
commited on
Commit
•
3c9c655
1
Parent(s):
80a2093
Add Dockerfile
Browse files- Dockerfile +23 -0
- README.md +5 -4
- gradio_app.py +2 -2
Dockerfile
ADDED
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
FROM python:3.8.15
|
2 |
+
|
3 |
+
RUN useradd -ms /bin/bash admin
|
4 |
+
|
5 |
+
ENV WORKDIR=/code
|
6 |
+
WORKDIR $WORKDIR
|
7 |
+
RUN chown -R admin:admin $WORKDIR
|
8 |
+
RUN chmod 755 $WORKDIR
|
9 |
+
|
10 |
+
COPY requirements.txt $WORKDIR/requirements.txt
|
11 |
+
|
12 |
+
RUN pip install gradio --no-cache-dir
|
13 |
+
RUN pip install --no-cache-dir --upgrade -r $WORKDIR/requirements.txt
|
14 |
+
|
15 |
+
COPY . .
|
16 |
+
|
17 |
+
RUN sh deform_setup.sh
|
18 |
+
|
19 |
+
USER admin
|
20 |
+
|
21 |
+
EXPOSE 7860
|
22 |
+
|
23 |
+
ENTRYPOINT ["python", "gradio_app.py"]
|
README.md
CHANGED
@@ -3,12 +3,13 @@ title: OneFormer
|
|
3 |
emoji: 🎗️
|
4 |
colorFrom: red
|
5 |
colorTo: blue
|
6 |
-
sdk:
|
7 |
-
|
8 |
-
|
|
|
9 |
pinned: false
|
10 |
license: mit
|
11 |
-
python_version: 3.8.15
|
12 |
---
|
13 |
|
14 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
3 |
emoji: 🎗️
|
4 |
colorFrom: red
|
5 |
colorTo: blue
|
6 |
+
sdk: docker
|
7 |
+
app_port: 7860
|
8 |
+
# sdk_version: docker
|
9 |
+
# app_file: gradio_app.py
|
10 |
pinned: false
|
11 |
license: mit
|
12 |
+
# python_version: 3.8.15
|
13 |
---
|
14 |
|
15 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
gradio_app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import subprocess
|
2 |
import torch
|
3 |
-
if torch.cuda.is_available():
|
4 |
-
|
5 |
|
6 |
print("Installed the dependencies!")
|
7 |
|
|
|
1 |
import subprocess
|
2 |
import torch
|
3 |
+
# if torch.cuda.is_available():
|
4 |
+
# subprocess.run('sh deform_setup.sh', shell=True)
|
5 |
|
6 |
print("Installed the dependencies!")
|
7 |
|