darkvibe314 commited on
Commit
eacbe0b
·
verified ·
1 Parent(s): 0ceb5a8

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -13
Dockerfile CHANGED
@@ -1,20 +1,17 @@
1
- FROM mcr.microsoft.com/playwright/python:v1.44.0-jammy
2
 
3
- WORKDIR /app
 
 
 
 
4
 
5
- # Required for curl_cffi to compile
6
- RUN apt-get update && apt-get install -y \
7
- curl \
8
- build-essential \
9
- libcurl4-openssl-dev \
10
- && rm -rf /var/lib/apt/lists/*
11
 
12
- COPY requirements.txt .
13
  RUN pip install --no-cache-dir -r requirements.txt
14
- RUN playwright install chromium --with-deps
15
 
16
- COPY . .
17
 
18
  EXPOSE 7860
19
-
20
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]
 
1
+ FROM mcr.microsoft.com/playwright/python:v1.49.1-jammy
2
 
3
+ RUN useradd -m -u 1000 user
4
+ USER user
5
+ ENV HOME=/home/user \
6
+ PATH=/home/user/.local/bin:$PATH \
7
+ PYTHONUNBUFFERED=1
8
 
9
+ WORKDIR /home/user/app
 
 
 
 
 
10
 
11
+ COPY --chown=user requirements.txt .
12
  RUN pip install --no-cache-dir -r requirements.txt
 
13
 
14
+ COPY --chown=user . .
15
 
16
  EXPOSE 7860
17
+ CMD ["python", "app.py"]