-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathdockerfile-qai
executable file
·43 lines (36 loc) · 1000 Bytes
/
dockerfile-qai
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
43
# Builder stage
FROM python:3.12.3-slim AS builder
WORKDIR /app/QuantaAI
#ai-model
RUN pip install --no-cache-dir -U \
uvicorn \
fastapi \
langchain \
langchain-anthropic \
langchain-google-genai \
langchain-openai \
langchain-xai \
langchain-community \
langchain-core \
langchain-text-splitters \
langgraph \
pydantic \
pydantic-core \
gradio
# Final stage
FROM python:3.12.3-slim
LABEL maintainer="[email protected]"
ARG QAI_HOST
ARG QAI_PORT
# Copy installed packages from builder stage
COPY --from=builder /usr/local/lib/python3.12/site-packages /usr/local/lib/python3.12/site-packages
COPY --from=builder /usr/local/bin /usr/local/bin
# Set up the directory structure
WORKDIR /app
# Copy application code
COPY common ./common
COPY QuantaAI ./QuantaAI
# Set the working directory to QuantaAI where quanta_ai.py is located
WORKDIR /app/QuantaAI
# Run the uvicorn server
CMD uvicorn quanta_ai:app --host ${QAI_HOST} --port ${QAI_PORT}