AkshayStark commited on
Commit
203c659
·
1 Parent(s): ebf5359
Files changed (1) hide show
  1. Dockerfile +4 -1
Dockerfile CHANGED
@@ -2,6 +2,9 @@ FROM python:3.12
2
 
3
  WORKDIR /app
4
 
 
 
 
5
  # Install required system dependencies for Playwright
6
  RUN apt-get update && apt-get install -y \
7
  libnss3 \
@@ -52,5 +55,5 @@ COPY . .
52
  # Expose port
53
  EXPOSE 7860
54
 
55
- # Run application and ensure Playwright installs Chromium at runtime
56
  CMD ["sh", "-c", "poetry run playwright install chromium && poetry run uvicorn server:app --host 0.0.0.0 --port 7860"]
 
2
 
3
  WORKDIR /app
4
 
5
+ # Set Playwright's cache directory to a writable location
6
+ ENV PLAYWRIGHT_BROWSERS_PATH=/app/playwright-browsers
7
+
8
  # Install required system dependencies for Playwright
9
  RUN apt-get update && apt-get install -y \
10
  libnss3 \
 
55
  # Expose port
56
  EXPOSE 7860
57
 
58
+ # Run application
59
  CMD ["sh", "-c", "poetry run playwright install chromium && poetry run uvicorn server:app --host 0.0.0.0 --port 7860"]