For backward compatibility we build two sets of images 1) We don't change the way how we build images using PIP. This assumes having so called requirements image that contains all the necessary wheels and then we build all other project images using these wheels from the requirements image. 2) Also we add another set of images that we build using the two stage Dockerfile. On the first stage we build venv using UV and then we just copy the venv as is to the project image. Depends-On: Id6412055f742990f08aa1befa7a41f1670414d4c Change-Id: I0726c1b7d9f9bee3097c4891248f41169fe6ac46 Signed-off-by: Vladimir Kozhukalov <kozhukalov@gmail.com>
42 lines
1.1 KiB
Bash
Executable File
42 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
source $(dirname $0)/helpers.sh
|
|
|
|
export LC_CTYPE=C.UTF-8
|
|
export CASS_DRIVER_BUILD_CONCURRENCY=8
|
|
export UWSGI_PROFILE_OVERRIDE=ssl=true
|
|
export CPUCOUNT=1
|
|
|
|
for file in /opt/loci/pydep*; do
|
|
PYDEP_PACKAGES+=($(bindep -f $file -b -l newline ${PROJECT} ${PROJECT_RELEASE} ${PROFILES} || :))
|
|
done
|
|
uv pip install -c /global-requirements.txt -c /upper-constraints.txt \
|
|
${UV_PIP_ARGS} \
|
|
${PYDEP_PACKAGES[@]}
|
|
|
|
clone_project "${PROJECT}" "${PROJECT_REPO}" "${PROJECT_REF}"
|
|
|
|
extra_projects_path=""
|
|
for pr in $EXTRA_PROJECTS; do
|
|
extra_projects_path="$extra_projects_path /tmp/${pr}"
|
|
done
|
|
|
|
project_cmd=/tmp/${PROJECT}
|
|
if [[ -n ${PROJECT_PIP_EXTRAS} ]]; then
|
|
project_cmd="${project_cmd}[${PROJECT_PIP_EXTRAS}]"
|
|
fi
|
|
|
|
# Presence of constraint for project we build
|
|
# in upper constraints breaks project installation
|
|
# with unsatisfied constraints error.
|
|
# This line ensures that such constraint is absent.
|
|
sed -i "/^${PROJECT}===/d" /upper-constraints.txt
|
|
|
|
uv pip install -c /global-requirements.txt -c /upper-constraints.txt \
|
|
${UV_PIP_ARGS} \
|
|
${project_cmd} ${extra_projects_path} ${PIP_PACKAGES}
|
|
|
|
collect_info
|