Skip to content

Commit 7199677

Browse files
committed
buildc: Refactor Dockerfile for improved clarity and organization
1 parent 06f2796 commit 7199677

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

sources/gc-qa-rag-server/Dockerfile

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,29 @@ FROM python:3.13-slim
22

33
WORKDIR /code
44

5-
# Copy files
6-
COPY ./pyproject.toml ./pdm.lock ./.env /code/
5+
# Install system dependencies
6+
RUN apt-get update && apt-get install -y \
7+
curl \
8+
&& rm -rf /var/lib/apt/lists/*
79

8-
# Intall pdm
9-
RUN pip install --no-cache-dir pdm && \
10-
pdm --pep582 >> ~/.bashrc
10+
# Install PDM
11+
RUN pip install --no-cache-dir pdm
1112

12-
# Install packages
13-
RUN pdm install --prod
13+
# Copy dependency files
14+
COPY ./pyproject.toml ./pdm.lock /code/
1415

15-
# Copy codes and configurations
16+
# Install project dependencies
17+
RUN pdm install --prod --no-editable
18+
19+
# Enable PEP 582
20+
ENV PYTHONPATH=/code/__pypackages__/3.13/lib
21+
ENV PYTHONPATH=${PYTHONPATH}:/code
22+
23+
# Copy application code and configurations
1624
COPY ./ragapp /code/ragapp
17-
COPY ./.config.development.json ./.config.production.json /code/
25+
COPY ./.env ./.config.development.json ./.config.production.json /code/
1826

1927
EXPOSE 8000
2028

21-
# Run application
22-
CMD ["pdm","start"]
29+
# Run application (adjust this to your actual startup command)
30+
CMD ["pdm", "run", "start"]

0 commit comments

Comments
 (0)