Remostart commited on
Commit
55d4d3e
·
verified ·
1 Parent(s): 5ca3f62

milestone one and two AI BRIAN AND MULTILINGUA commit

Browse files
Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
-
2
  FROM python:3.10-slim
3
 
4
 
@@ -9,7 +9,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
9
 
10
  WORKDIR /code
11
 
12
- # Install system dependencies
13
  RUN apt-get update && apt-get install -y --no-install-recommends \
14
  build-essential \
15
  git \
@@ -20,38 +20,37 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
20
 
21
 
22
  COPY requirements.txt .
23
-
24
-
25
  RUN pip install --no-cache-dir -r requirements.txt
26
 
27
-
28
  RUN pip install --no-cache-dir huggingface-hub sentencepiece accelerate fasttext
29
 
 
 
 
 
 
30
 
31
- ENV HF_HOME=/models/huggingface
32
- ENV TRANSFORMERS_CACHE=/models/huggingface
33
- ENV HUGGINGFACE_HUB_CACHE=/models/huggingface
34
- ENV HF_HUB_CACHE=/models/huggingface
35
 
36
- # Create cache dir
37
- RUN mkdir -p /models/huggingface
38
-
39
- # Pre-download models at build time (Qwen + SentenceTransformer + FastText + NLLB finetuned)
40
  RUN python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='Qwen/Qwen3-4B-Instruct-2507')" \
41
  && python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2')" \
42
  && python -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='facebook/fasttext-language-identification', filename='model.bin')" \
43
- && python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='drrobot9/nllb-ig-yo-ha-finetuned')"
 
44
 
45
  # Preload tokenizers (avoid runtime delays)
46
  RUN python -c "from transformers import AutoTokenizer; AutoTokenizer.from_pretrained('Qwen/Qwen3-4B-Instruct-2507', use_fast=True)" \
47
  && python -c "from transformers import AutoTokenizer; AutoTokenizer.from_pretrained('sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2', use_fast=True)" \
48
  && python -c "from transformers import AutoTokenizer; AutoTokenizer.from_pretrained('drrobot9/nllb-ig-yo-ha-finetuned', use_fast=True)"
49
 
50
-
51
  COPY . .
52
 
53
-
54
  EXPOSE 7860
55
 
56
- # Run FastAPI app with uvicorn (2 workers for better concurrency)
57
- CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "2"]
 
1
+ # Base Image
2
  FROM python:3.10-slim
3
 
4
 
 
9
 
10
  WORKDIR /code
11
 
12
+ # System Dependencies
13
  RUN apt-get update && apt-get install -y --no-install-recommends \
14
  build-essential \
15
  git \
 
20
 
21
 
22
  COPY requirements.txt .
 
 
23
  RUN pip install --no-cache-dir -r requirements.txt
24
 
25
+ # Hugging Face + model tools
26
  RUN pip install --no-cache-dir huggingface-hub sentencepiece accelerate fasttext
27
 
28
+ # Hugging Face cache environment
29
+ ENV HF_HOME=/models/huggingface \
30
+ TRANSFORMERS_CACHE=/models/huggingface \
31
+ HUGGINGFACE_HUB_CACHE=/models/huggingface \
32
+ HF_HUB_CACHE=/models/huggingface
33
 
34
+ # Created cache dir and set permissions
35
+ RUN mkdir -p /models/huggingface && chmod -R 777 /models/huggingface
 
 
36
 
37
+ # Pre-download models at build time
 
 
 
38
  RUN python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='Qwen/Qwen3-4B-Instruct-2507')" \
39
  && python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2')" \
40
  && python -c "from huggingface_hub import hf_hub_download; hf_hub_download(repo_id='facebook/fasttext-language-identification', filename='model.bin')" \
41
+ && python -c "from huggingface_hub import snapshot_download; snapshot_download(repo_id='drrobot9/nllb-ig-yo-ha-finetuned')" \
42
+ && find /models/huggingface -name '*.lock' -delete
43
 
44
  # Preload tokenizers (avoid runtime delays)
45
  RUN python -c "from transformers import AutoTokenizer; AutoTokenizer.from_pretrained('Qwen/Qwen3-4B-Instruct-2507', use_fast=True)" \
46
  && python -c "from transformers import AutoTokenizer; AutoTokenizer.from_pretrained('sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2', use_fast=True)" \
47
  && python -c "from transformers import AutoTokenizer; AutoTokenizer.from_pretrained('drrobot9/nllb-ig-yo-ha-finetuned', use_fast=True)"
48
 
49
+ # Copy project files
50
  COPY . .
51
 
52
+ # Expose FastAPI port
53
  EXPOSE 7860
54
 
55
+ # Run FastAPI app with uvicorn (1 workers for concurrency)
56
+ CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860", "--workers", "1"]
app/agents/__pycache__/crew_pipeline.cpython-312.pyc CHANGED
Binary files a/app/agents/__pycache__/crew_pipeline.cpython-312.pyc and b/app/agents/__pycache__/crew_pipeline.cpython-312.pyc differ