apexherbert200 commited on
Commit
4abb273
·
1 Parent(s): 1864ecb

Fix Playwright module import error

Browse files

- Add playwright back to requirements.txt (needed for Python import)
- Set PLAYWRIGHT_BROWSERS_PATH to use existing browsers from base image
- This should resolve 'No module named playwright' error
- Playwright package provides Python API, browsers are from base image

Files changed (2) hide show
  1. Dockerfile +3 -0
  2. requirements.txt +1 -0
Dockerfile CHANGED
@@ -12,6 +12,9 @@ RUN apk add --no-cache python3 py3-pip
12
  COPY requirements.txt .
13
  RUN python3 -m pip install --no-cache-dir --break-system-packages -r requirements.txt
14
 
 
 
 
15
  # Copy your code
16
  COPY . .
17
 
 
12
  COPY requirements.txt .
13
  RUN python3 -m pip install --no-cache-dir --break-system-packages -r requirements.txt
14
 
15
+ # Set environment variable to use existing browsers
16
+ ENV PLAYWRIGHT_BROWSERS_PATH=/usr/bin
17
+
18
  # Copy your code
19
  COPY . .
20
 
requirements.txt CHANGED
@@ -1,3 +1,4 @@
1
  fastapi
2
  uvicorn[standard]
3
  pydantic
 
 
1
  fastapi
2
  uvicorn[standard]
3
  pydantic
4
+ playwright