ArchCoder commited on
Commit
d8c14c8
·
verified ·
1 Parent(s): 2dc4fb9

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +30 -0
Dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Install system dependencies
4
+ RUN apt-get update && apt-get install -y \
5
+ ffmpeg \
6
+ gcc \
7
+ g++ \
8
+ git \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # Create non-root user
12
+ RUN useradd -m -u 1000 user
13
+ USER user
14
+ ENV PATH="/home/user/.local/bin:$PATH"
15
+
16
+ WORKDIR /app
17
+
18
+ # Copy requirements and install
19
+ COPY --chown=user requirements.txt .
20
+ RUN pip install --no-cache-dir --upgrade pip && \
21
+ pip install --no-cache-dir -r requirements.txt
22
+
23
+ # Copy application files
24
+ COPY --chown=user app.py .
25
+
26
+ # Expose port
27
+ EXPOSE 7860
28
+
29
+ # Run the app
30
+ CMD ["python", "app.py"]