build time
Browse files- App/Shaders/utils.py +0 -2
- Dockerfile +11 -1
App/Shaders/utils.py
CHANGED
@@ -1,7 +1,5 @@
|
|
1 |
import os
|
2 |
-
import os
|
3 |
|
4 |
-
os.makedirs("/usr/local/lib/python3.10/site-packages/Workspace", exist_ok=True)
|
5 |
os.environ["WINDOW_BACKEND"] = "headless" # Use software rendering
|
6 |
os.environ["SKIP_TORCH"] = "1"
|
7 |
|
|
|
1 |
import os
|
|
|
2 |
|
|
|
3 |
os.environ["WINDOW_BACKEND"] = "headless" # Use software rendering
|
4 |
os.environ["SKIP_TORCH"] = "1"
|
5 |
|
Dockerfile
CHANGED
@@ -58,6 +58,16 @@ USER appuser
|
|
58 |
COPY --chown=appuser . /srv
|
59 |
|
60 |
# Command to run the application
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
# Expose the server port
|
63 |
EXPOSE 7860
|
|
|
58 |
COPY --chown=appuser . /srv
|
59 |
|
60 |
# Command to run the application
|
61 |
+
# Create a startup script
|
62 |
+
RUN echo '#!/bin/bash\n\
|
63 |
+
rm -rf /usr/local/lib/python3.10/site-packages/Workspace\n\
|
64 |
+
mkdir -p /usr/local/lib/python3.10/site-packages/Workspace\n\
|
65 |
+
ln -sf /home/admin/.local/share/BrokenSource/Broken /usr/local/lib/python3.10/site-packages/Workspace/Broken\n\
|
66 |
+
ln -sf /home/admin/.local/share/BrokenSource/DepthFlow /usr/local/lib/python3.10/site-packages/Workspace/DepthFlow\n\
|
67 |
+
uvicorn app:app --host 0.0.0.0 --port 8000\n'\
|
68 |
+
> /app/start.sh && chmod +x /app/start.sh
|
69 |
+
|
70 |
+
# Run the startup script when the container launches
|
71 |
+
CMD ["/app/start.sh"]
|
72 |
# Expose the server port
|
73 |
EXPOSE 7860
|