MASSJ77 commited on
Commit
03fa7b1
·
verified ·
1 Parent(s): 1655c9f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +32 -0
Dockerfile ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # ---- Base image ----
2
+ FROM python:3.11-slim
3
+
4
+ # ---- Set environment variables ----
5
+ ENV PYTHONDONTWRITEBYTECODE 1
6
+ ENV PYTHONUNBUFFERED 1
7
+ ENV HF_HOME=/tmp/hf_cache
8
+
9
+ # ---- Install system dependencies ----
10
+ RUN apt-get update && apt-get install -y \
11
+ git \
12
+ ffmpeg \
13
+ libgl1 \
14
+ libglib2.0-0 \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ # ---- Create working directory ----
18
+ WORKDIR /app
19
+
20
+ # ---- Copy requirements and install ----
21
+ COPY requirements.txt .
22
+ RUN pip install --upgrade pip
23
+ RUN pip install --no-cache-dir -r requirements.txt
24
+
25
+ # ---- Copy app code ----
26
+ COPY . .
27
+
28
+ # ---- Expose FastAPI port ----
29
+ EXPOSE 8000
30
+
31
+ # ---- Run Uvicorn ----
32
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8000"]