Changed the docker scripts

This commit is contained in:
Jorrit Wronski
2016-05-27 10:25:21 +02:00
parent 662e10f8fe
commit 08fd0997aa
3 changed files with 38 additions and 16 deletions

View File

@@ -655,11 +655,13 @@ def python_manylinux_builder(bitness="64"):
# Remove the temporary folder for installs
factory.addStep(RemoveDirectory(dir="build/install_root", haltOnFailure = False))
factory.addStep(ShellCommand(command = ' '.join(['chmod',"+x","build_images.sh","&&","./build_images.sh",str(bitness)]),
factory.addStep(ShellCommand(command = ' '.join(['chmod',"+x","00_prepare_docker.sh","&&","./00_prepare_docker.sh",str(bitness)]),
workdir= working_folder,
haltOnFailure = True))
factory.addStep(DirectoryUpload(slavesrc="install_root", masterdest=master_loc_rel, url="binaries", compress="bz2"))
fixPermissions(factory)
#factory.addStep(DirectoryUpload(slavesrc="install_root", masterdest=master_loc_rel, url="binaries", compress="bz2"))
pyID = getIDstr(platform="linux", bitness=str(bitness)+"bit")
upload_command(factory, "install_root", pyID=pyID)
return factory
# def deb_slave():
@@ -1097,13 +1099,13 @@ c['builders'].append(
)
c['builders'].append(
BuilderConfig(name="Python-binaries-linux-64bit",
slavenames=["OSX-IB-slave"],
slavenames=["OSX-IPU-slave"],
factory = python_manylinux_builder(bitness=64)
)
)
c['builders'].append(
BuilderConfig(name="Python-binaries-linux-32bit",
slavenames=["OSX-IB-slave"],
slavenames=["OSX-IPU-slave"],
factory = python_manylinux_builder(bitness=32)
)
)

View File

@@ -4,14 +4,14 @@ BITNESS="$1"
if [[ "$BITNESS" == "64" ]]
then
DOCKER_MACHINE_NAME="coolprop/manylinux"
DOCKER_MACHINE_ARGS="cmake=default,64"
SETUP_PY_ARGS="cmake=default,64"
elif [[ "$BITNESS" == "32" ]]
then
DOCKER_MACHINE_NAME="coolprop/manylinux32"
DOCKER_MACHINE_ARGS="cmake=default,32"
SETUP_PY_ARGS="cmake=default,32"
else
DOCKER_MACHINE_NAME="coolprop/manylinux"
DOCKER_MACHINE_ARGS="cmake=default,64"
echo "Received an unknown argument, aborting."
exit 1
fi
DOCKER_MACHINE_TAG="v1.4.2"
@@ -21,6 +21,8 @@ set -ex
# Only start docker-machine if needed
# https://gist.github.com/ladyrassilon/31fa6877a9c24ae4e8f0
# Check if docker-machine is available as command
if hash docker-machine 2>/dev/null
then
docker_running=$(docker-machine ls | grep default)
@@ -29,6 +31,8 @@ else
docker_running=""
fi
# If docker-machine is available, chack if we have
# to start virtual machine that the containers run in.
if [[ "$docker_running" == *"Stopped"* ]]
then
docker-machine start default
@@ -36,11 +40,22 @@ then
env | grep "DOCKER_HOST"
elif [[ "$docker_running" == *"Running"* ]]
then
eval "$(docker-machine env default)"
eval "$(docker-machine env default)"
env | grep "DOCKER_HOST"
else
echo "Direct access to docker required, assuming native installation."
fi
# Get the directory containing this script
# see http://stackoverflow.com/a/246128/1360263
CUR_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Go up three directories
pushd ../../..
pushd ${CUR_DIR}/../../..
# Run the build script
docker run --rm -v `pwd`:/io ${DOCKER_MACHINE_NAME}:${DOCKER_MACHINE_TAG} /io/wrappers/Python/manylinux/build_wheels.sh ${DOCKER_MACHINE_ARGS}
docker run --rm -v `pwd`:/io ${DOCKER_MACHINE_NAME}:${DOCKER_MACHINE_TAG} /io/wrappers/Python/manylinux/01_build_wheels.sh ${SETUP_PY_ARGS}
popd
exit 0

View File

@@ -8,15 +8,16 @@ set -ex
# Get the directory containing this script
# see http://stackoverflow.com/a/246128/1360263
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Into the pypi directory
cd ${DIR}/../pypi
# # Build the .tar.gz with the sources
# pushd ${DIR}/../pypi
# source /py27/bin/activate
# python prepare_pypi.py --dist-dir=`pwd`/../dist
# deactivate
# popd
pushd ${DIR}/..
cd ${DIR}/..
for PYBIN in /py*; do
source ${PYBIN}/bin/activate
c++ --version
@@ -28,4 +29,8 @@ done
for whl in dist/*.whl; do
# auditwheel comes in base image
auditwheel repair $whl -w ../../install_root/Python
done
done
popd
exit 0