Mbonea commited on
Commit
22e4054
·
1 Parent(s): fe50dcc
Files changed (2) hide show
  1. App/Shaders/utils.py +2 -0
  2. Dockerfile +2 -3
App/Shaders/utils.py CHANGED
@@ -1,5 +1,7 @@
1
  import os
 
2
 
 
3
  os.environ["WINDOW_BACKEND"] = "headless" # Use software rendering
4
  os.environ["SKIP_TORCH"] = "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
 
Dockerfile CHANGED
@@ -57,8 +57,7 @@ USER appuser
57
 
58
  COPY --chown=appuser . /srv
59
 
60
- # Run your shader application when the container launches
61
- CMD ["python", "-c", "import os; os.makedirs('/usr/local/lib/python3.10/site-packages/Workspace', exist_ok=True); os.system('uvicorn app:app --host 0.0.0.0 --port 8000 --workers 1')"]
62
-
63
  # Expose the server port
64
  EXPOSE 7860
 
57
 
58
  COPY --chown=appuser . /srv
59
 
60
+ # Command to run the application
61
+ CMD uvicorn App.app:app --host 0.0.0.0 --port 7860 --workers 1
 
62
  # Expose the server port
63
  EXPOSE 7860