Python package handling for things currently added manually to the
system python are moved to the virtual environments instead. This
affects the sphinx and gcovr packages.
args[${#args[@]}]="--llvm 8 --cuda 11.0 --clfft --mpi openmpi"
args[${#args[@]}]="--llvm 9 --clfft --mpi openmpi --ubuntu 18.04"
args[${#args[@]}]="--oneapi 2021.1.1"
args[${#args[@]}]="--llvm 8 --cuda 11.0 --clfft --mpi openmpi"
args[${#args[@]}]="--llvm 9 --clfft --mpi openmpi --ubuntu 18.04"
args[${#args[@]}]="--oneapi 2021.1.1"
-args[${#args[@]}]="--llvm --doxygen"
+args[${#args[@]}]="--llvm --doxygen --mpi openmpi --venvs 3.7.7"
echo "Building the following images."
for arg_string in "${args[@]}"; do
echo "Building the following images."
for arg_string in "${args[@]}"; do
compiler = compiler_build_stage.runtime(_from='oneapi')
# Prepare the toolchain (needed only for builds done within the Dockerfile, e.g.
# OpenMPI builds, which don't currently work for other reasons)
compiler = compiler_build_stage.runtime(_from='oneapi')
# Prepare the toolchain (needed only for builds done within the Dockerfile, e.g.
# OpenMPI builds, which don't currently work for other reasons)
- oneapi_toolchain = hpccm.toolchain(CC='/opt/intel/oneapi/compiler/latest/linux/bin/intel64/icx',
- CXX='/opt/intel/oneapi/compiler/latest/linux/bin/intel64/icpx')
+ oneapi_toolchain = hpccm.toolchain(CC=f'/opt/intel/oneapi/compiler/{args.oneapi}/linux/bin/intel64/icx',
+ CXX=f'/opt/intel/oneapi/compiler/{args.oneapi}/linux/bin/intel64/icpx')
setattr(compiler, 'toolchain', oneapi_toolchain)
else:
setattr(compiler, 'toolchain', oneapi_toolchain)
else:
)
# Ensure that all bash shells on the final container will have access to oneAPI
oneapi_stage += hpccm.primitives.shell(
)
# Ensure that all bash shells on the final container will have access to oneAPI
oneapi_stage += hpccm.primitives.shell(
- commands=['echo "source /opt/intel/oneapi/setvars.sh" >> /etc/bash.bashrc']
+ commands=['echo "source /opt/intel/oneapi/setvars.sh" >> /etc/bash.bashrc',
+ 'unlink /opt/intel/oneapi/compiler/latest',
+ f'ln -sf /opt/intel/oneapi/compiler/{version} /opt/intel/oneapi/compiler/latest']
)
setattr(oneapi_stage, 'runtime', oneapi_runtime)
)
setattr(oneapi_stage, 'runtime', oneapi_runtime)
commands.append(f"""{venv_path}/bin/python -m pip install --upgrade \
'cmake>=3.13' \
'flake8>=3.7.7' \
commands.append(f"""{venv_path}/bin/python -m pip install --upgrade \
'cmake>=3.13' \
'flake8>=3.7.7' \
'mpi4py>=3.0.3' \
'networkx>=2.0' \
'numpy>=1' \
'pip>=10.1' \
'mpi4py>=3.0.3' \
'networkx>=2.0' \
'numpy>=1' \
'pip>=10.1' \
'pytest>=3.9' \
'setuptools>=42' \
'pytest>=3.9' \
'setuptools>=42' \
- 'scikit-build>=0.10'""")
+ 'scikit-build>=0.10' \
+ 'Sphinx>=1.6.3' \
+ 'sphinxcontrib-plantuml>=0.14'""")
# TODO: Remove 'importlib_resources' dependency when Python >=3.7 is required.
if minor == 6:
# TODO: Remove 'importlib_resources' dependency when Python >=3.7 is required.
if minor == 6:
return
output_stages['main'] += hpccm.primitives.shell(
commands=['sed -i \'/\"XPS\"/d;/\"PDF\"/d;/\"PS\"/d;/\"EPS\"/d;/disable ghostscript format types/d\' /etc/ImageMagick-6/policy.xml'])
return
output_stages['main'] += hpccm.primitives.shell(
commands=['sed -i \'/\"XPS\"/d;/\"PDF\"/d;/\"PS\"/d;/\"EPS\"/d;/disable ghostscript format types/d\' /etc/ImageMagick-6/policy.xml'])
- output_stages['main'] += hpccm.building_blocks.pip(pip='pip3', packages=['sphinx==1.6.1', 'gcovr'])
if input_args.doxygen == '1.8.5':
doxygen_commit = 'ed4ed873ab0e7f15116e2052119a6729d4589f7a'
output_stages['main'] += hpccm.building_blocks.generic_autotools(
if input_args.doxygen == '1.8.5':
doxygen_commit = 'ed4ed873ab0e7f15116e2052119a6729d4589f7a'
output_stages['main'] += hpccm.building_blocks.generic_autotools(
stages['main'] += bb
# We always add Python3 and Pip
stages['main'] += bb
# We always add Python3 and Pip
- stages['main'] += hpccm.building_blocks.python(python3=True, python2=False, devel=True)
- stages['main'] += hpccm.building_blocks.pip(upgrade=True, pip='pip3',
- packages=['pytest', 'networkx', 'numpy'])
+ stages['main'] += hpccm.building_blocks.python(python3=True, python2=False)
# Add documentation requirements (doxygen and sphinx + misc).
if args.doxygen is not None:
# Add documentation requirements (doxygen and sphinx + misc).
if args.doxygen is not None:
mkdir $BUILD_DIR ;
fi
- cd $BUILD_DIR
mkdir $BUILD_DIR ;
fi
- cd $BUILD_DIR
+ # Running CMake with the venv activated should not be strictly necessary,
+ # but helps to find and cache self-consistent Python and Sphinx details
+ # without additional hinting. Once CMakeCache.txt exists, the later stages
+ # should work fine without reactivating the venv.
+ - source /root/venv/py3.7/bin/activate
- cmake ..
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
$CMAKE_COMPILER_SCRIPT
- cmake ..
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
$CMAKE_COMPILER_SCRIPT
Avoid using *before-script* directly, and be cautious
about nested *extends* overriding multiple *before_script* definitions.
Avoid using *before-script* directly, and be cautious
about nested *extends* overriding multiple *before_script* definitions.
There is no global default, but jobs that build software will likely
set *cache*. To explicitly unset *cache* directives, specify a job
parameter of ``cache: {}``.
There is no global default, but jobs that build software will likely
set *cache*. To explicitly unset *cache* directives, specify a job
parameter of ``cache: {}``.