Adarshu07 commited on
Commit
966dc21
·
verified ·
1 Parent(s): 209e6a4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile CHANGED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ ENV PYTHONDONTWRITEBYTECODE=1 \
4
+ PYTHONUNBUFFERED=1
5
+
6
+ RUN useradd -m -u 1000 user
7
+
8
+ WORKDIR /app
9
+
10
+ COPY requirements.txt .
11
+ RUN pip install --no-cache-dir --upgrade pip && \
12
+ pip install --no-cache-dir -r requirements.txt
13
+
14
+ COPY . .
15
+
16
+ RUN chown -R user:user /app
17
+ USER user
18
+
19
+ EXPOSE 7860
20
+
21
+ CMD ["uvicorn", "app:app", \
22
+ "--host", "0.0.0.0", \
23
+ "--port", "7860", \
24
+ "--workers", "1", \
25
+ "--timeout-keep-alive", "120", \
26
+ "--log-level", "info"]