Simonc-44 commited on
Commit
1c48e60
·
verified ·
1 Parent(s): 4d28d0a

Create dockerfile

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