Madras1 commited on
Commit
369883b
·
verified ·
1 Parent(s): e9e419f

Upload 5 files

Browse files
Files changed (3) hide show
  1. Dockerfile +22 -13
  2. requirements.txt +28 -12
  3. stopwords.txt +42 -1
Dockerfile CHANGED
@@ -1,24 +1,33 @@
1
- FROM python:3.11-slim
 
 
2
 
 
 
 
 
3
  WORKDIR /app
4
 
5
- # Install system dependencies
6
- RUN apt-get update && apt-get install -y \
7
- gcc \
8
- && rm -rf /var/lib/apt/lists/*
 
 
 
 
9
 
10
- # Copy requirements first for better caching
11
  COPY requirements.txt .
 
 
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
- # Copy application code
15
  COPY . .
16
 
17
- # Create data directory for SQLite
18
- RUN mkdir -p /app/data
19
-
20
- # Expose port (HF Spaces uses 7860)
21
  EXPOSE 7860
22
 
23
- # Run the application
24
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
 
1
+ # ==============================================================================
2
+ # Dockerfile — AetherMap API (versão profissional)
3
+ # ==============================================================================
4
 
5
+ # Imagem Python robusta (não slim → evita erros de build)
6
+ FROM python:3.10
7
+
8
+ # Define diretório da aplicação
9
  WORKDIR /app
10
 
11
+ # --- INSTALAR TORCH CPU ANTES (CRÍTICO!) ---
12
+ # Isso garante que a versão certa (CPU) seja instalada
13
+ RUN pip install --no-cache-dir \
14
+ torch \
15
+ torchvision \
16
+ torchaudio \
17
+ --index-url https://download.pytorch.org/whl/cpu
18
+
19
 
20
+ # Copiar requirements
21
  COPY requirements.txt .
22
+
23
+ # Instalar dependências restantes
24
  RUN pip install --no-cache-dir -r requirements.txt
25
 
26
+ # Copiar código da aplicação
27
  COPY . .
28
 
29
+ # Expor porta usada pelo Hugging Face Spaces
 
 
 
30
  EXPOSE 7860
31
 
32
+ # Comando padrão para executar FastAPI
33
+ CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
requirements.txt CHANGED
@@ -1,12 +1,28 @@
1
- fastapi==0.104.1
2
- uvicorn[standard]==0.24.0
3
- sqlalchemy==2.0.23
4
- pydantic==2.5.2
5
- pydantic-settings==2.1.0
6
- requests==2.31.0
7
- beautifulsoup4==4.12.2
8
- httpx==0.25.2
9
- python-multipart==0.0.6
10
- aiohttp==3.9.1
11
- feedparser==6.0.10
12
- # httpx already included - used for Cerebras API calls
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # --- SERVIDOR E API ---
2
+ fastapi
3
+ uvicorn[standard]
4
+ python-multipart
5
+ openai
6
+ prometheus-fastapi-instrumentator
7
+ prometheus-client
8
+ tavily-python
9
+
10
+ # --- MACHINE LEARNING E NLP ---
11
+ sentence-transformers
12
+ numpy
13
+ pandas
14
+ scikit-learn
15
+ scipy
16
+ umap-learn
17
+ hdbscan
18
+ faiss-cpu
19
+ nltk
20
+ spacy
21
+ langdetect
22
+ https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.7.1/en_core_web_sm-3.7.1-py3-none-any.whl
23
+ https://github.com/explosion/spacy-models/releases/download/pt_core_news_sm-3.7.0/pt_core_news_sm-3.7.0-py3-none-any.whl
24
+
25
+ # --- TORCH CPU (>=2.6 required for CVE-2025-32434) ---
26
+ torch>=2.6.0
27
+ torchvision
28
+ torchaudio
stopwords.txt CHANGED
@@ -543,4 +543,45 @@ terceiro
543
  último
544
  próximo
545
  anterior
546
- seguinte
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
543
  último
544
  próximo
545
  anterior
546
+ seguinte
547
+
548
+ # --- TERMOS ADICIONAIS COMUNS (PT) ---
549
+ ano
550
+ anos
551
+ dia
552
+ dias
553
+ brasil
554
+ paulo
555
+ casa
556
+ feira
557
+ postado
558
+ ainda
559
+ sobre
560
+ ver
561
+ hoje
562
+ aqui
563
+
564
+ vez
565
+ vezes
566
+ sempre
567
+ nunca
568
+ muito
569
+ muita
570
+ muitos
571
+ muitas
572
+ pouco
573
+ poucos
574
+ outro
575
+ outra
576
+ outros
577
+ outras
578
+ porque
579
+ porquê
580
+ então
581
+ assim
582
+ pois
583
+ melhor
584
+ pior
585
+ maior
586
+ menor
587
+ menos