File size: 485 Bytes
e39f0e1
e2aa18d
e39f0e1
e2aa18d
e39f0e1
 
e2aa18d
e39f0e1
 
 
e2aa18d
fb84c7a
e2aa18d
 
fb84c7a
e2aa18d
 
fb84c7a
e39f0e1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM python:3.9-slim

WORKDIR /app

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

# Install Python libraries
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

# Download Spacy model during build to save time
RUN python -m spacy download en_core_web_sm

# Copy your code
COPY . .

# Hugging Face uses port 7860 by default
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]