abdullahalioo commited on
Commit
2fcdd12
·
verified ·
1 Parent(s): ff2bc3b

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +35 -0
Dockerfile ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # Set working directory
4
+ WORKDIR /app
5
+
6
+ # Install system dependencies
7
+ RUN apt-get update && \
8
+ apt-get install -y --no-install-recommends \
9
+ build-essential \
10
+ git \
11
+ && rm -rf /var/lib/apt/lists/*
12
+
13
+
14
+
15
+ # Set environment variables
16
+
17
+
18
+ # Copy requirements first
19
+ COPY requirements.txt .
20
+
21
+ # Install Python dependencies
22
+ RUN pip install --upgrade pip && \
23
+ pip install --no-cache-dir -r requirements.txt
24
+
25
+ # Copy application code
26
+ COPY . .
27
+
28
+
29
+ USER myuser
30
+
31
+ # Expose port
32
+ EXPOSE 7860
33
+
34
+ # Run the app
35
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]