File size: 669 Bytes
b89e6d6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Container for the FastAPI service. Build: docker build -t code-gen-assistant .
# Run:   docker run -p 8000:8000 code-gen-assistant
# For generated-code execution safety, run with --network none if you don't need
# the model to download at runtime (bake the index/model into the image instead).
FROM python:3.11-slim

WORKDIR /app

# System deps for tokenizers / faiss wheels.
RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential git && rm -rf /var/lib/apt/lists/*

COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt

COPY . .

EXPOSE 8000
CMD ["uvicorn", "app.api:app", "--host", "0.0.0.0", "--port", "8000"]