VeuReu commited on
Commit
1f2b7f0
verified
1 Parent(s): 45a8fee

Upload 3 files

Browse files
Files changed (2) hide show
  1. Dockerfile +12 -4
  2. requirements.txt +23 -17
Dockerfile CHANGED
@@ -1,16 +1,24 @@
1
  FROM python:3.11-slim
2
 
3
- # Dependencias del sistema necesarias para v铆deo/ocr (ajusta si no las usas)
4
  RUN apt-get update && apt-get install -y --no-install-recommends \
5
- ffmpeg libsndfile1 libsm6 libxext6 libgl1 tesseract-ocr \
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
  WORKDIR /app
 
 
 
 
 
9
  COPY requirements.txt /app/
10
  RUN pip install --no-cache-dir -r requirements.txt
11
 
 
12
  COPY . /app
13
 
14
- # HF Spaces expone PORT
15
  ENV PORT=7860
16
- CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]
 
 
 
1
  FROM python:3.11-slim
2
 
3
+ # SO deps necesarias para audio/v铆deo/OCR
4
  RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ ffmpeg libsndfile1 libsm6 libxext6 libgl1 tesseract-ocr build-essential \
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
  WORKDIR /app
9
+
10
+ # Mejora estabilidad de instalaci贸n de wheels
11
+ RUN pip install --no-cache-dir --upgrade pip setuptools wheel
12
+
13
+ # Instala deps primero (mejor cacheo)
14
  COPY requirements.txt /app/
15
  RUN pip install --no-cache-dir -r requirements.txt
16
 
17
+ # Copia el c贸digo
18
  COPY . /app
19
 
20
+ # Puerto usado por HF Spaces
21
  ENV PORT=7860
22
+
23
+ # Lanza FastAPI (ajusta si tu entrypoint NO es main_api.py)
24
+ CMD ["uvicorn", "api:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]
requirements.txt CHANGED
@@ -1,34 +1,40 @@
1
- # Core num茅rico (compatibles con pyannote)
 
 
 
 
 
 
 
 
 
2
  numpy==1.26.4
3
  scipy==1.11.4
4
 
5
- # PyTorch pareado con torchaudio (CPU)
6
  torch==2.3.0
7
  torchaudio==2.3.0
8
 
9
- # Pyannote
10
  pyannote.audio==3.1.1
11
  huggingface_hub>=0.23
12
 
13
- # Audio/ML que ya usas
14
  librosa>=0.10
15
  soundfile>=0.12
16
  pydub>=0.25
17
  ffmpeg-python>=0.2
 
18
 
19
- # Resto de tu stack (ejemplos)
20
- fastapi==0.114.2
21
- uvicorn[standard]==0.30.6
22
- python-multipart==0.0.9
23
- PyYAML>=6.0
24
- requests>=2.32
25
- gradio_client>=0.16.0
26
  opencv-python-headless==4.10.0.84
27
- scikit-learn>=1.5
28
- sentence-transformers>=3.0
29
- transformers>=4.44
30
- chromadb>=0.5.4
31
- moviepy>=2.0
32
- tenacity>=8.2
33
  PySceneDetect==0.5.6
 
 
 
34
 
 
 
 
 
 
 
1
+ # Infra API
2
+ fastapi==0.114.2
3
+ uvicorn[standard]==0.30.6
4
+ python-multipart==0.0.9
5
+ PyYAML>=6.0
6
+ requests>=2.32
7
+ gradio_client>=0.16.0
8
+ tenacity>=8.2
9
+
10
+ # N煤cleo cient铆fico (compatibles con pyannote)
11
  numpy==1.26.4
12
  scipy==1.11.4
13
 
14
+ # PyTorch CPU pareado con torchaudio
15
  torch==2.3.0
16
  torchaudio==2.3.0
17
 
18
+ # Diarizaci贸n local
19
  pyannote.audio==3.1.1
20
  huggingface_hub>=0.23
21
 
22
+ # Audio / v铆deo
23
  librosa>=0.10
24
  soundfile>=0.12
25
  pydub>=0.25
26
  ffmpeg-python>=0.2
27
+ moviepy==2.0.0
28
 
29
+ # Visi贸n / OCR / CV
 
 
 
 
 
 
30
  opencv-python-headless==4.10.0.84
 
 
 
 
 
 
31
  PySceneDetect==0.5.6
32
+ pytesseract>=0.3
33
+ easyocr>=1.7
34
+ Pillow>=10.4
35
 
36
+ # Embeddings / ML
37
+ scikit-learn==1.4.2
38
+ sentence-transformers>=3.0
39
+ transformers==4.44.0
40
+ chromadb==0.5.4