-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (34 loc) · 1.36 KB
/
Dockerfile
File metadata and controls
49 lines (34 loc) · 1.36 KB
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
# Base image
FROM python:3.11 AS base
# Set the working directory in the container
WORKDIR /app
# Install dependencies
RUN apt-get update && apt-get install -y unzip curl
# Install poetry
RUN curl -sSL https://install.python-poetry.org | python3 -
# Update the PATH to include the Poetry binary
ENV PATH="/root/.local/bin:${PATH}"
# Copy only the pyproject.toml and poetry.lock (if it exists)
COPY pyproject.toml poetry.lock* /app/
# Configure poetry to not create virtual environment
RUN poetry config virtualenvs.create false
# Install the project dependencies (without dev dependencies)
RUN poetry install --no-interaction --no-ansi --without dev
# Copy the rest of the application
COPY . /app
# Verify dependencies are installed
RUN python -c "import qdrant_client; print('✓ qdrant_client installed')" && \
python -c "import openai; print('✓ openai installed')" && \
python -c "import langchain; print('✓ langchain installed')"
# batch_embedder image
FROM base AS batch_embedder
# Set the environment variable for the batch_embedder
ENV PYTHONPATH="/app/batch_embedder/app"
# Set the command to run the batch_embedder
CMD ["python", "batch_embedder/app/main.py"]
# chat_cli image
FROM base AS chat_cli
# Set the environment variable for the chat_cli
ENV PYTHONPATH="/app/chat_cli/app"
# Set the command to run the chat_cli
CMD ["python", "chat_cli/app/main.py"]