File size: 603 Bytes
d0ef9e9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# 1) Base image
FROM python:3.10-slim

# 2) Print logs unbuffered
ENV PYTHONUNBUFFERED=1

# 3) Working directory
WORKDIR /app

# 4) Copy & install Python dependencies
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt

# 5) Copy your FastAPI app
COPY classifier.py .

# 6) Build-time secret (or omit and inject at runtime)
ARG TOGETHERAI_API_KEY
ENV TOGETHERAI_API_KEY=${TOGETHERAI_API_KEY}

# 7) Expose the port
EXPOSE 8000

# 8) Launch Uvicorn directly—no wrapper script needed
CMD ["uvicorn", "classifier:app", "--host", "0.0.0.0", "--port", "8000", "--log-level", "info"]