Skip to content

Commit 664e78d

Browse files
committed
Refactor Dockerfile to improve dependency installation and caching
1 parent 106be85 commit 664e78d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,23 @@ RUN apt-get update && \
1717

1818
# Copy requirements first (for better caching)
1919
COPY requirements.txt .
20+
COPY setup.py .
21+
COPY setup.cfg .
22+
COPY pyproject.toml .
23+
COPY MANIFEST.in .
24+
COPY README.md .
2025

2126
# Install Python dependencies
2227
RUN pip install --no-cache-dir --upgrade pip && \
2328
pip install --no-cache-dir -r requirements.txt && \
2429
pip install --no-cache-dir hypercorn>=0.18.0
2530

31+
# Copy source code
32+
COPY src/ ./src/
33+
34+
# Install the package in development mode
35+
RUN pip install --no-cache-dir -e .
36+
2637
# Copy application code
2738
COPY . .
2839

0 commit comments

Comments
 (0)