ksumhs commited on
Commit
dbb9ae7
·
verified ·
1 Parent(s): 7204a8e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +46 -0
Dockerfile ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ============================
2
+ # Base Image
3
+ # ============================
4
+ FROM python:3.10-slim
5
+
6
+ # Prevent Python from buffering stdout
7
+ ENV PYTHONUNBUFFERED=1
8
+
9
+ # ============================
10
+ # Install System Dependencies
11
+ # ============================
12
+ RUN apt-get update && apt-get install -y \
13
+ git \
14
+ cmake \
15
+ build-essential \
16
+ libgl1-mesa-glx \
17
+ libglib2.0-0 \
18
+ && rm -rf /var/lib/apt/lists/*
19
+
20
+ # ============================
21
+ # Working Directory
22
+ # ============================
23
+ WORKDIR /app
24
+
25
+ # ============================
26
+ # Copy Requirements
27
+ # ============================
28
+ COPY requirements.txt /app/requirements.txt
29
+
30
+ # Install Python dependencies
31
+ RUN pip install --no-cache-dir -r requirements.txt
32
+
33
+ # ============================
34
+ # Copy Application Files
35
+ # ============================
36
+ COPY . /app
37
+
38
+ # ============================
39
+ # Expose Port
40
+ # ============================
41
+ EXPOSE 7860
42
+
43
+ # ============================
44
+ # Start FastAPI Server
45
+ # ============================
46
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]