File size: 849 Bytes
0ca462b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM python:3.11-slim

WORKDIR /app

# Install system dependencies
RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    && rm -rf /var/lib/apt/lists/*

# Install dependencies directly DONT REDOWNLOAD, the packages are heavy as fuck
RUN pip install \
    fastapi \
    uvicorn[standard] \
    meilisearch \
    pydantic \
    pydantic-settings \
    onnxruntime \
    numpy \
    transformers \
    torch --extra-index-url https://download.pytorch.org/whl/cpu \
    sentence-transformers \
    redis \
    prometheus-client \
    slowapi \
    scikit-learn \
    nltk \
    aiohttp \
    python-multipart

# Copy application code
COPY app/ /app/app/

# Set environment variable
ENV PYTHONPATH=/app

# Expose port
EXPOSE 8000

# Run the unified service
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]