Mayank2027 commited on
Commit
c0ce62f
·
verified ·
1 Parent(s): 0c2affd

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -11
Dockerfile CHANGED
@@ -1,27 +1,18 @@
1
  FROM mcr.microsoft.com/playwright/python:v1.49.0-jammy
2
 
3
- # Switch to root to install extra packages if needed (but we keep it minimal)
4
- USER root
5
- RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
6
-
7
- # Back to the non‑root user
8
  USER pwuser
9
  WORKDIR /app
10
 
11
  ENV PATH="/home/pwuser/.local/bin:${PATH}"
12
- ENV PLAYWRIGHT_BROWSERS_PATH=/home/pwuser/.cache/ms-playwright
13
 
14
  # Copy requirements first (caching)
15
  COPY --chown=pwuser requirements.txt .
16
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
17
 
18
- # Install only the lightweight headless shell (saves ~100MB)
19
- RUN playwright install chromium-headless-shell && playwright install-deps
20
-
21
- # Copy the application code
22
  COPY --chown=pwuser . .
23
 
24
  EXPOSE 7860
25
 
26
- # Start with debug logging to see any early errors
27
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--log-level", "debug"]
 
1
  FROM mcr.microsoft.com/playwright/python:v1.49.0-jammy
2
 
 
 
 
 
 
3
  USER pwuser
4
  WORKDIR /app
5
 
6
  ENV PATH="/home/pwuser/.local/bin:${PATH}"
 
7
 
8
  # Copy requirements first (caching)
9
  COPY --chown=pwuser requirements.txt .
10
  RUN pip install --no-cache-dir --upgrade -r requirements.txt
11
 
12
+ # Copy application code
 
 
 
13
  COPY --chown=pwuser . .
14
 
15
  EXPOSE 7860
16
 
17
+ # Start with debug logging
18
  CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--log-level", "debug"]