Trisha Tomy commited on
Commit
ffa6b34
·
1 Parent(s): 2495948

updated dockerfile debug stms+app

Browse files
Files changed (2) hide show
  1. Dockerfile +9 -8
  2. app.py +1 -1
Dockerfile CHANGED
@@ -79,16 +79,17 @@ RUN xvfb-run python -m playwright install chromium
79
 
80
  # Set environment variables for Playwright (can be redundant but good to ensure persistence)
81
  ENV PLAYWRIGHT_BROWSERS_PATH=/root/.cache/ms-playwright/
 
 
82
 
83
  # --- Debugging: Check Playwright version and browser installation (moved AFTER install) ---
84
- RUN echo "--- Checking Playwright Version ---"
85
- RUN python -m playwright --version
86
- RUN echo "--- Listing Playwright Browser Cache (Recursive) ---"
87
- # This will list contents of subdirectories as well
88
- RUN ls -alR /root/.cache/ms-playwright/
89
- RUN echo "-----------------------------------"
90
- # --- End Debugging ---
91
-
92
 
93
  # Expose the port your Flask app will listen on. Hugging Face Spaces requires 7860.
94
  EXPOSE 7860
 
79
 
80
  # Set environment variables for Playwright (can be redundant but good to ensure persistence)
81
  ENV PLAYWRIGHT_BROWSERS_PATH=/root/.cache/ms-playwright/
82
+ # Add this to ensure Playwright doesn't try to re-download at runtime
83
+ ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
84
 
85
  # --- Debugging: Check Playwright version and browser installation (moved AFTER install) ---
86
+ RUN echo "--- Checking Playwright Version ---"
87
+ RUN python -m playwright --version
88
+ RUN echo "--- Listing Playwright Browser Cache (Recursive) ---"
89
+ # This will list contents of subdirectories as well
90
+ RUN ls -alR /root/.cache/ms-playwright/
91
+ RUN echo "-----------------------------------"
92
+ # --- End Debugging ---
 
93
 
94
  # Expose the port your Flask app will listen on. Hugging Face Spaces requires 7860.
95
  EXPOSE 7860
app.py CHANGED
@@ -28,7 +28,7 @@ async def initialize_runner():
28
  "name": "webbrowser",
29
  "homepage": "https://www.google.com",
30
  "headless": True,
31
- "launch_args": ["--no-sandbox"]
32
  },
33
  "solver": {
34
  "name": "simple",
 
28
  "name": "webbrowser",
29
  "homepage": "https://www.google.com",
30
  "headless": True,
31
+ "launch_args": ["--no-sandbox", "--disable-setuid-sandbox"]
32
  },
33
  "solver": {
34
  "name": "simple",