VeuReu commited on
Commit
ce57807
verified
1 Parent(s): 4eab6bb

Upload Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -35
Dockerfile CHANGED
@@ -1,44 +1,19 @@
1
- # ==== Base ====
2
  FROM python:3.11-slim
3
 
4
- # Evita prompts de debconf y acelera pip
5
- ENV DEBIAN_FRONTEND=noninteractive \
6
- PIP_DISABLE_PIP_VERSION_CHECK=1 \
7
  PYTHONUNBUFFERED=1 \
8
- # Variables de afinidad de CPU para ONNX Runtime
9
- OMP_NUM_THREADS=1 \
10
- OPENBLAS_NUM_THREADS=1 \
11
- MKL_NUM_THREADS=1 \
12
- NUMEXPR_NUM_THREADS=1
13
 
14
- # ==== Sistema: Instalaci贸n de dependencias (ffmpeg y espeak-ng) ====
15
- RUN apt-get update && apt-get install -y --no-install-recommends \
16
- espeak-ng ffmpeg libsndfile1 git \
17
- # Librer铆as necesarias para la instalaci贸n de locales
18
- locales \
19
- && rm -rf /var/lib/apt/lists/*
20
-
21
- # Configuraci贸n del locale catal谩n (necesario para espeak-ng/phonemizer)
22
- RUN sed -i 's/# ca_ES.UTF-8 UTF-8/ca_ES.UTF-8 UTF-8/' /etc/locale.gen && \
23
- locale-gen
24
- ENV LANG=ca_ES.UTF-8 \
25
- LC_ALL=ca_ES.UTF-8
26
-
27
- # Comando para refrescar la cach茅 de librer铆as din谩micas (importante para espeak-ng)
28
- RUN ldconfig
29
-
30
- # ==== App: Instalaci贸n de Python y Copia de Archivos ====
31
  WORKDIR /app
32
- # Copiamos todos los archivos del proyecto (incluyendo libs/ y requirements.txt)
33
- COPY . .
34
 
35
- # Instalaci贸n de dependencias de Python
36
- RUN python -m pip install --upgrade pip \
37
- && pip install --no-cache-dir --prefer-binary -r requirements.txt
 
 
 
38
 
39
- # Hugging Face expone $PORT (7860 normalmente)
40
- ENV PORT=7860
41
  EXPOSE 7860
 
42
 
43
- # Arranque de FastAPI con Uvicorn
44
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # Dockerfile (FAKE)
2
  FROM python:3.11-slim
3
 
4
+ ENV PYTHONDONTWRITEBYTECODE=1 \
 
 
5
  PYTHONUNBUFFERED=1 \
6
+ PORT=7860
 
 
 
 
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  WORKDIR /app
 
 
9
 
10
+ # Requisitos m铆nimos para arrancar un servidor HTTP
11
+ COPY requirements-fake.txt .
12
+ RUN pip install --no-cache-dir -r requirements-fake.txt
13
+
14
+ # App m铆nima
15
+ COPY app_fake.py /app/app.py
16
 
 
 
17
  EXPOSE 7860
18
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]
19