@@ -47,20 +47,20 @@ RUN dnf -y install --enablerepo crb \
4747RUN dnf install -y redis \
4848 && dnf -y clean all
4949
50- # Ensure pip/setuptools are up to date
51- # rpm-build requires libraries in /usr
52- RUN python3 -m pip install --upgrade --prefix=/usr pip ; \
53- python3 -m pip install --upgrade --prefix=/usr setuptools wheel setuptools-scm[toml] build
50+ # Prepare a venv and ensure we have up to date pip/setuptools/build modules
51+ RUN su - adm -s /bin/bash -c "python3 -m venv /var/tmp/de_venv ; \
52+ source /var/tmp/de_venv/bin/activate ; \
53+ python3 -m pip install --upgrade pip ; \
54+ python3 -m pip install --upgrade setuptools wheel setuptools-scm[toml] build"
5455
55- # Install decisionengine requirements (runtime and testing)
56- # do as one layer to simplify merges
57- # rpm-build requires libraries in /usr
58- RUN su - adm -s /bin/bash -c "git clone https://github.com/HEPCloud/decisionengine.git /tmp/decisionengine.git" ; \
56+ # Install decisionengine requirements (runtime and testing) in the venv
57+ RUN su - adm -s /bin/bash -c "source /var/tmp/de_venv/bin/activate ; \
58+ git clone https://github.com/HEPCloud/decisionengine.git /tmp/decisionengine.git ; \
5959 cd /tmp/decisionengine.git ; \
60- su adm -s /bin/bash -c "cd /tmp/decisionengine.git ; python3 setup.py bdist_wheel" ; \
61- python3 -m pip install --prefix=/usr dist/*.whl ; \
62- python3 -m pip install --prefix=/usr decisionengine[develop] ; \
60+ python3 setup.py bdist_wheel ; \
61+ python3 -m pip install dist/*.whl ; \
62+ python3 -m pip install decisionengine[develop] ; \
6363 python3 -m pip uninstall -y decisionengine ; \
64- rm -rf /tmp/decisionengine.git
64+ rm -rf /tmp/decisionengine.git"
6565
6666ENTRYPOINT ["/bin/bash" ]
0 commit comments