Fix Dockerfile build issue

This commit is contained in:
kyy
2025-03-18 16:41:12 +09:00
parent 6814230bfb
commit 9323aa254a
228 changed files with 467 additions and 3488 deletions

View File

@@ -7,8 +7,9 @@ ENV PYTHONUNBUFFERED=1 \
PYTHONDONTWRITEBYTECODE=1 \
PIP_NO_CACHE_DIR=1
# Copy only requirements files first to leverage Docker cache
COPY pyproject.toml ./
# Copy only necessary files
COPY pyproject.toml ./
COPY requirements.txt ./
# Install system and Python dependencies in a single layer
RUN apt-get update && \
@@ -19,10 +20,20 @@ RUN apt-get update && \
pip install --no-cache-dir --upgrade pip setuptools setuptools-scm && \
rm -rf /var/lib/apt/lists/*
# Copy project files
COPY . .
# Install base project
RUN pip install --no-cache-dir -e .
RUN pip install -r requirements.txt
CMD ["bash"]
# Copy project files
COPY autorag /usr/src/app/autorag
COPY main.py /usr/src/app/main.py
COPY making.sh /usr/src/app/making.sh
COPY entrypoint.sh /usr/src/app/entrypoint.sh
# Set permissions for entrypoint
RUN chmod +x /usr/src/app/entrypoint.sh
# Use entrypoint.sh as the container entrypoint
ENTRYPOINT ["/usr/src/app/entrypoint.sh"]
# Set a default command (optional, can be overridden)
CMD ["bash"]