Spaces:
Running
Running
CrazyT
commited on
Commit
•
7067c12
1
Parent(s):
f244b86
cpu error message
Browse files- Dockerfile +1 -1
- app.py +1 -1
Dockerfile
CHANGED
@@ -11,9 +11,9 @@ RUN --mount=target=requirements1.txt,source=requirements1.txt pip install --no-
|
|
11 |
RUN --mount=target=requirements2.txt,source=requirements2.txt pip install --no-cache-dir -r requirements2.txt
|
12 |
RUN pip install gradio
|
13 |
RUN wget -O output.zip -q https://huggingface.co/camenduru/Dynamic3DGaussians/resolve/main/output.zip?download=true && unzip output.zip && rm output.zip
|
|
|
14 |
COPY --chown=user . /home/user/app
|
15 |
RUN cp -R /home/user/app/Dynamic3DGaussians /home/user/app/Dynamic3DGaussians_cpu
|
16 |
RUN sed -i s/\.cuda\(\)\./\./ /home/user/app/Dynamic3DGaussians_cpu/*.py
|
17 |
RUN sed -i s/,\ device="cuda"// /home/user/app/Dynamic3DGaussians_cpu/*.py
|
18 |
-
RUN apt-get update && apt-get install -y xvfb
|
19 |
ENTRYPOINT ["bash", "/home/user/app/runWithXvfb.sh"]
|
|
|
11 |
RUN --mount=target=requirements2.txt,source=requirements2.txt pip install --no-cache-dir -r requirements2.txt
|
12 |
RUN pip install gradio
|
13 |
RUN wget -O output.zip -q https://huggingface.co/camenduru/Dynamic3DGaussians/resolve/main/output.zip?download=true && unzip output.zip && rm output.zip
|
14 |
+
RUN apt-get update && apt-get install -y xvfb
|
15 |
COPY --chown=user . /home/user/app
|
16 |
RUN cp -R /home/user/app/Dynamic3DGaussians /home/user/app/Dynamic3DGaussians_cpu
|
17 |
RUN sed -i s/\.cuda\(\)\./\./ /home/user/app/Dynamic3DGaussians_cpu/*.py
|
18 |
RUN sed -i s/,\ device="cuda"// /home/user/app/Dynamic3DGaussians_cpu/*.py
|
|
|
19 |
ENTRYPOINT ["bash", "/home/user/app/runWithXvfb.sh"]
|
app.py
CHANGED
@@ -66,6 +66,6 @@ def do_nothing():
|
|
66 |
iface = None
|
67 |
if IS_CPU:
|
68 |
iface = gr.Interface(fn=do_nothing, inputs=None, outputs=[gr.Textbox(label="Error", value="Not possible on CPU")], allow_flagging="never")
|
69 |
-
else
|
70 |
iface = gr.Interface(fn=run_simulation, inputs=gr.Dropdown(["basketball", "boxes", "football", "juggle", "softball", "tennis"], value="basketball"), outputs=[gr.Video(format="mp4"), gr.File(), gr.Image(), gr.Textbox(label="debug output")], allow_flagging="never")
|
71 |
iface.launch(server_name="0.0.0.0")
|
|
|
66 |
iface = None
|
67 |
if IS_CPU:
|
68 |
iface = gr.Interface(fn=do_nothing, inputs=None, outputs=[gr.Textbox(label="Error", value="Not possible on CPU")], allow_flagging="never")
|
69 |
+
else:
|
70 |
iface = gr.Interface(fn=run_simulation, inputs=gr.Dropdown(["basketball", "boxes", "football", "juggle", "softball", "tennis"], value="basketball"), outputs=[gr.Video(format="mp4"), gr.File(), gr.Image(), gr.Textbox(label="debug output")], allow_flagging="never")
|
71 |
iface.launch(server_name="0.0.0.0")
|