Pranavpai0309 commited on
Commit
293509a
·
verified ·
1 Parent(s): 53ef8cf

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +24 -0
Dockerfile ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11
2
+
3
+ # Add apt repositories and install system packages
4
+ USER root
5
+
6
+ RUN apt-get update && apt-get install -y \
7
+ tesseract-ocr \
8
+ libgl1-mesa-glx \
9
+ ffmpeg \
10
+ && apt-get clean && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Continue with Python packages and user permissions
13
+ RUN useradd -m -u 1000 user
14
+ USER user
15
+ ENV PATH="/home/user/.local/bin:$PATH"
16
+
17
+ WORKDIR /app
18
+
19
+ COPY --chown=user ./requirements.txt requirements.txt
20
+ RUN pip install --no-cache-dir --upgrade -r requirements.txt
21
+
22
+ COPY --chown=user . /app
23
+
24
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]