mirror of
https://github.com/hwanny1128/HGZero.git
synced 2025-12-06 23:06:23 +00:00
feat: add rag ci/cd
This commit is contained in:
parent
5c1285c3de
commit
66101b2465
@ -11,9 +11,11 @@ RUN apt-get update && apt-get install -y \
|
||||
libpq-dev \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy requirements and install dependencies
|
||||
# Copy requirements and install to /opt/venv
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir --user -r requirements.txt
|
||||
RUN python -m venv /opt/venv
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
# Run stage
|
||||
FROM python:3.11-slim
|
||||
@ -35,15 +37,14 @@ RUN adduser --system --group ${USERNAME} && \
|
||||
|
||||
WORKDIR ${ARTIFACTORY_HOME}
|
||||
|
||||
# Copy Python dependencies from builder
|
||||
# COPY --from=builder /root/.local /home/${USERNAME}/.local
|
||||
COPY --from=builder --chown=${USERNAME}:${USERNAME} /root/.local /home/${USERNAME}/.local
|
||||
# Copy Python virtual environment from builder
|
||||
COPY --from=builder /opt/venv /opt/venv
|
||||
|
||||
# Copy application code
|
||||
COPY --chown=${USERNAME}:${USERNAME} . .
|
||||
|
||||
# Update PATH to include user's local bin
|
||||
ENV PATH=/home/${USERNAME}/.local/bin:$PATH
|
||||
# Update PATH to include venv
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
|
||||
USER ${USERNAME}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user