yukee1992 commited on
Commit
4f1ae26
·
verified ·
1 Parent(s): 84e7c36

Create Dockerfile

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