Zynara commited on
Commit
18f9d1d
·
verified ·
1 Parent(s): 020b0a7

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +53 -0
Dockerfile ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ===============================
2
+ # Base image
3
+ # ===============================
4
+ FROM python:3.11-slim
5
+
6
+ # ===============================
7
+ # System dependencies for ML / audio / vision
8
+ # ===============================
9
+ RUN apt-get update && apt-get install -y --no-install-recommends \
10
+ build-essential \
11
+ git \
12
+ ffmpeg \
13
+ libsndfile1 \
14
+ libjpeg-dev \
15
+ zlib1g-dev \
16
+ curl \
17
+ wget \
18
+ && rm -rf /var/lib/apt/lists/*
19
+
20
+ # ===============================
21
+ # Upgrade pip
22
+ # ===============================
23
+ RUN python -m pip install --upgrade pip setuptools wheel
24
+
25
+ # ===============================
26
+ # Set working directory
27
+ # ===============================
28
+ WORKDIR /app
29
+
30
+ # ===============================
31
+ # Copy requirements
32
+ # ===============================
33
+ COPY requirements.txt .
34
+
35
+ # ===============================
36
+ # Install Python dependencies
37
+ # ===============================
38
+ RUN pip install --no-cache-dir -r requirements.txt
39
+
40
+ # ===============================
41
+ # Copy app source
42
+ # ===============================
43
+ COPY . .
44
+
45
+ # ===============================
46
+ # Expose FastAPI default port
47
+ # ===============================
48
+ EXPOSE 8000
49
+
50
+ # ===============================
51
+ # Default command
52
+ # ===============================
53
+ CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]