ffplima commited on
Commit
cc72a64
·
verified ·
1 Parent(s): 34b15bf

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -0
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.11-slim
2
+
3
+ # libs nativas para OpenCV/Mediapipe
4
+ RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ libgl1 libglib2.0-0 libxext6 libsm6 libstdc++6 libgcc-s1 libgomp1 \
6
+ && rm -rf /var/lib/apt/lists/*
7
+
8
+ WORKDIR /app
9
+
10
+ # deps Python
11
+ COPY requirements.txt .
12
+ RUN pip install --no-cache-dir -r requirements.txt
13
+
14
+ # app
15
+ COPY app ./app
16
+
17
+ # a porta do Spaces vem via env PORT; use-a no uvicorn
18
+ ENV PORT=7860
19
+ EXPOSE ${PORT}
20
+ CMD bash -lc "uvicorn app.main:app --host 0.0.0.0 --port ${PORT}"