sanch1tx commited on
Commit
7c77477
·
verified ·
1 Parent(s): 51764f7

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +3 -12
Dockerfile CHANGED
@@ -1,27 +1,18 @@
1
- # Use the official Playwright image
2
- FROM mcr.microsoft.com/playwright/python:v1.40.0-jammy
3
 
4
- # CHANGE: Use UID 1001 to avoid conflict with the existing user 1000
5
  RUN useradd -m -u 1001 user
6
-
7
- # Switch to the new user
8
  USER user
9
-
10
- # Set environment variables for the new user
11
  ENV HOME=/home/user \
12
  PATH=/home/user/.local/bin:$PATH
13
 
14
- # Set working directory
15
  WORKDIR $HOME/app
16
 
17
- # Copy files and set ownership to the new user
18
  COPY --chown=user . $HOME/app
19
 
20
- # Install dependencies
21
  RUN pip install --no-cache-dir -r requirements.txt
22
 
23
- # Expose the API port
24
  EXPOSE 7860
25
 
26
- # Start the API
27
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # UPDATE: Changed from v1.40.0 to v1.57.0 to match the latest library version
2
+ FROM mcr.microsoft.com/playwright/python:v1.57.0-jammy
3
 
4
+ # Create a new user (UID 1001) to avoid conflict with existing 'pwuser'
5
  RUN useradd -m -u 1001 user
 
 
6
  USER user
 
 
7
  ENV HOME=/home/user \
8
  PATH=/home/user/.local/bin:$PATH
9
 
 
10
  WORKDIR $HOME/app
11
 
 
12
  COPY --chown=user . $HOME/app
13
 
 
14
  RUN pip install --no-cache-dir -r requirements.txt
15
 
 
16
  EXPOSE 7860
17
 
 
18
  CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]