-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
52 lines (43 loc) · 1.72 KB
/
Dockerfile
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
44
45
46
47
48
49
50
51
52
# FROM alpine
# # Install Python and build tools
# RUN apk update && apk add python3~3.12 g++ build-base
FROM python:3.12.6-slim-bullseye@sha256:6fe70237cff8ad7c0a91b992cb7cb454187dfd2e3f08ce2d023907d76db8c287
#RUN apk update && apk add --no-cache g++ build-base
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
g++ \
build-essential \
libffi-dev \
python3-dev \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /code
ENV PROJECT_NAME="VIRTUAL ASSISTANT"
ENV DATABASE_URL="mysql+mysqlconnector://moodleuser:password123@localhost/moodle"
ENV POSTGRES_SERVER="moodle.cd2wy4iagdv9.ap-southeast-1.rds.amazonaws.com"
ENV POSTGRES_DB="moodle"
ENV POSTGRES_USER="postgres"
ENV POSTGRES_PASSWORD="1307x2Npk"
ENV POSTGRES_PORT="5432"
ENV HUGGINGFACE_API_KEY="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"
ENV PINECONE_API_KEY="3e9197b0-4ce5-4702-b779-e955674bdbb0"
ENV GOOGLE_API_KEY="AIzaSyAqUcIWqH_CO2S-ayPm7YgW4Jk5ffCww2E"
ENV GROQ_API_KEY="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"
ENV OPENAI_API_KEY="NO"
ENV LANGCHAIN_TRACING_V2="true"
ENV LANGCHAIN_ENDPOINT="https://api.smith.langchain.com"
ENV LANGCHAIN_API_KEY="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"
ENV LANGCHAIN_PROJECT="va"
RUN python3 -m venv venv
RUN venv/bin/pip install -U pip setuptools wheel
RUN venv/bin/pip install poetry==1.8.0
# RUN venv/bin/pip install --no-binary grpcio grpcio==1.65.1
# RUN . venv/bin/activate && \
# pip install poetry==1.7.0
#pip install --upgrade pip setuptools wheel
# pip install grpcio --no-binary :all:
COPY pyproject.toml /code/
RUN . venv/bin/activate && \
poetry install
COPY . /code
EXPOSE 5000
CMD ["venv/bin/uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "5000"]