Skip to content

Commit 2624b98

Browse files
authored
containerFile: only use the requirements of the TARGETARCH (#1717)
Avoid going through the two requirements files through requirements.txt. At this stage, this won't change anything since the requirements are the same.
1 parent 598c6ed commit 2624b98

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

wisdom-service.Containerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM registry.access.redhat.com/ubi9/ubi:latest AS production
22

33
ARG IMAGE_TAGS=image-tags-not-defined
44
ARG GIT_COMMIT=git-commit-not-defined
5+
ARG TARGETARCH
56

67
ARG DJANGO_SETTINGS_MODULE=ansible_ai_connect.main.settings.production
78

@@ -31,8 +32,8 @@ RUN dnf module enable nodejs:18 nginx:1.22 -y && \
3132

3233
# Copy the ansible_wisdom package files
3334
COPY requirements-x86_64.txt /var/www/ansible-ai-connect-service/
35+
COPY requirements-x86_64.txt /var/www/ansible-ai-connect-service/requirements-amd64.txt
3436
COPY requirements-aarch64.txt /var/www/ansible-ai-connect-service/
35-
COPY requirements.txt /var/www/ansible-ai-connect-service/
3637
COPY setup.cfg /var/www/ansible-ai-connect-service/setup.cfg
3738
COPY pyproject.toml /var/www/ansible-ai-connect-service/pyproject.toml
3839
COPY README.md /var/www/ansible-ai-connect-service/README.md
@@ -48,7 +49,7 @@ ENV PATH="/var/www/venv/bin:${PATH}"
4849
RUN dnf install -y openssl-devel
4950
RUN /var/www/venv/bin/python3.11 -m pip --no-cache-dir install --no-binary=all cryptography==43.0.1
5051

51-
RUN /var/www/venv/bin/python3.11 -m pip --no-cache-dir install -r/var/www/ansible-ai-connect-service/requirements.txt
52+
RUN /var/www/venv/bin/python3.11 -m pip --no-cache-dir install -r/var/www/ansible-ai-connect-service/requirements-${TARGETARCH}.txt
5253
RUN /var/www/venv/bin/python3.11 -m pip --no-cache-dir install -e/var/www/ansible-ai-connect-service/
5354
RUN mkdir /var/run/uwsgi /var/run/daphne
5455

0 commit comments

Comments
 (0)