hrlima commited on
Commit
04e2562
·
verified ·
1 Parent(s): f6b6cdf

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +34 -14
Dockerfile CHANGED
@@ -1,22 +1,42 @@
1
- # ===========================
2
- # 🧠 MindVoice API Dockerfile
3
- # ===========================
4
-
5
  FROM python:3.10-slim
6
 
 
 
 
 
 
 
 
 
 
 
 
7
  WORKDIR /home/user/app
8
 
9
- # Copia arquivos de dependências primeiro
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  COPY requirements.txt .
 
 
11
 
12
- # Instala dependências
13
- RUN pip install --no-cache-dir -r requirements.txt
14
-
15
- # Copia todo o restante, incluindo .env
16
  COPY . .
17
 
18
- EXPOSE 7860
19
-
20
- ENV PORT=7860
21
-
22
- CMD ["gunicorn", "--bind", "0.0.0.0:7860", "app:app"]
 
1
+ # ==========================
2
+ # Base Image
3
+ # ==========================
 
4
  FROM python:3.10-slim
5
 
6
+ # ==========================
7
+ # Environment
8
+ # ==========================
9
+ ENV PIP_NO_CACHE_DIR=1
10
+ ENV PYTHONUNBUFFERED=1
11
+ ENV PYTHONIOENCODING=utf-8
12
+ ENV PORT=7860
13
+
14
+ # ==========================
15
+ # Working directory
16
+ # ==========================
17
  WORKDIR /home/user/app
18
 
19
+ # ==========================
20
+ # Install system dependencies
21
+ # ==========================
22
+ RUN apt-get update && apt-get install -y \
23
+ git \
24
+ curl \
25
+ ffmpeg \
26
+ libsm6 \
27
+ libxext6 \
28
+ && rm -rf /var/lib/apt/lists/*
29
+
30
+ # ==========================
31
+ # Copy project files
32
+ # ==========================
33
  COPY requirements.txt .
34
+ RUN pip install --upgrade pip
35
+ RUN pip install -r requirements.txt
36
 
 
 
 
 
37
  COPY . .
38
 
39
+ # ==========================
40
+ # Run App
41
+ # ==========================
42
+ CMD ["python", "app.py"]