Sami Ali commited on
Commit
db376c5
·
1 Parent(s): e42c75a

add dockerfile

Browse files
Files changed (2) hide show
  1. DOCKERFILE +38 -0
  2. requirements.txt +0 -0
DOCKERFILE ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use Python 3.11 base image
2
+ FROM python:3.11-slim
3
+
4
+ # Avoid warnings by setting environment variables
5
+ ENV PYTHONUNBUFFERED=1 \
6
+ PIP_NO_CACHE_DIR=1 \
7
+ DEBIAN_FRONTEND=noninteractive
8
+
9
+ # Install system dependencies
10
+ RUN apt-get update && apt-get install -y --no-install-recommends \
11
+ git \
12
+ git-lfs \
13
+ ffmpeg \
14
+ libsm6 \
15
+ libxext6 \
16
+ cmake \
17
+ rsync \
18
+ libgl1 \
19
+ && rm -rf /var/lib/apt/lists/* \
20
+ && git lfs install
21
+
22
+ # Create a user for the app
23
+ RUN useradd -m -u 1000 user
24
+ WORKDIR /home/user/app
25
+ USER user
26
+
27
+ # Upgrade pip
28
+ RUN pip install --upgrade pip
29
+
30
+ # Copy requirements and install
31
+ COPY --chown=user:user requirements.txt .
32
+ RUN pip install -r requirements.txt
33
+
34
+ # Copy the rest of the app
35
+ COPY --chown=user:user . .
36
+
37
+ # Default command to run your app
38
+ CMD ["python", "app.py"]
requirements.txt CHANGED
Binary files a/requirements.txt and b/requirements.txt differ