File size: 688 Bytes
1eec5a6
 
 
 
 
 
 
 
 
 
 
 
d9f07b6
 
1eec5a6
d9f07b6
1eec5a6
 
abf3c4b
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM python:3.11-slim

WORKDIR /app

# Install dependencies first so they cache across code changes.
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

EXPOSE 8000

# curl is used by the docker-compose healthcheck; libgomp1 is required at
# runtime by faiss-cpu (OpenMP) and is not present in the slim base image.
RUN apt-get update \
    && apt-get install -y --no-install-recommends curl libgomp1 \
    && rm -rf /var/lib/apt/lists/*

# Honor $PORT when the host injects one (Railway, Fly, Render, …); default 8000
# for docker-compose, which maps and health-checks 8000.
CMD ["sh", "-c", "uvicorn app.main:app --host 0.0.0.0 --port ${PORT:-8000}"]