sxid003 commited on
Commit
d5ac809
·
verified ·
1 Parent(s): b9b2624

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Use an official Python image
2
+ FROM python:3.11-slim
3
+
4
+ # Set the working directory
5
+ WORKDIR /app
6
+ ENV PYTHONPATH=/app
7
+
8
+ # Copy required files
9
+ COPY requirements.txt ./
10
+ RUN pip install --no-cache-dir -r requirements.txt
11
+ RUN apt-get update && apt-get install -y ffmpeg
12
+ COPY . .
13
+
14
+ # Create an admin user with UID 1000
15
+ RUN useradd -m -u 1000 admin
16
+
17
+ # Create directories for logs and output, and set ownership to admin
18
+ RUN mkdir -p logs && chown -R admin:admin logs
19
+
20
+ # Switch to the admin user
21
+ USER admin
22
+
23
+ # Expose default ports: 6274 (MCP) and 7860 (Gradio)
24
+ EXPOSE 7860
25
+ EXPOSE 6274
26
+
27
+ # Entry command: start the MCP server in the background and then run main.py
28
+ CMD python src/mcp/server.py & python src/main.py