Skip to content

Commit

Permalink
Merge pull request #2172 from devitocodes/intelpython
Browse files Browse the repository at this point in the history
docker: switch to intelpython for icc/icx build
  • Loading branch information
mloubout authored Jul 27, 2023
2 parents 65dc7d8 + fb5d11e commit 44ee680
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pytest-core-nompi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ jobs:
- name: Test with pytest
run: |
${{ env.RUN_CMD }} ${{ matrix.arch }} --version
${{ env.RUN_CMD }} python3 --version
${{ env.RUN_CMD }} pytest -k "${{ matrix.test-set }}" -m "not parallel" --cov --cov-config=.coveragerc --cov-report=xml ${{ env.TESTS }}
- name: Upload coverage to Codecov
Expand Down
5 changes: 5 additions & 0 deletions docker/Dockerfile.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ ENV PATH $I_MPI_ROOT/libfabric/bin:$I_MPI_ROOT/bin:$I_ICC_ROOT/linux/bin/intel64
ENV LD_LIBRARY_PATH $I_MPI_ROOT/libfabric/lib:$I_MPI_ROOT/lib/release:$I_MPI_ROOT/lib:$I_ICC_ROOT/linux/lib:$I_ICC_ROOT/linux/lib/x64:$I_ICC_ROOT/linux/compiler/lib/intel64_lin:${LD_LIBRARY_PATH}
ENV FI_PROVIDER_PATH $I_MPI_ROOT/libfabric/lib/prov:/usr/lib64/libfabric:${LD_LIBRARY_PATH}

# Install intelpython
RUN wget https://registrationcenter-download.intel.com/akdlm/IRC_NAS/03aae3a8-623a-47cf-9655-5dd8fcf86430/l_pythoni39_oneapi_p_2023.2.0.49422.sh && \
chmod +x l_pythoni39_oneapi_p_2023.2.0.49422.sh && ./l_pythoni39_oneapi_p_2023.2.0.49422.sh -r yes -a -s --eula accept
ENV PATH /opt/intel/oneapi/intelpython/python3.9/bin:${PATH}

##############################################################
# ICC image
# This is a legacy setup that is not built anymore but kept for reference
Expand Down
15 changes: 0 additions & 15 deletions tests/test_environment.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import platform
import os

import numpy as np


Expand All @@ -15,15 +12,3 @@ def test_numpy_dot():

v = np.random.rand(1000).astype(np.float32)
assert np.isclose(np.dot(v, v), (v*v).sum())


def test_python_version():
"""
Test that the CI runs with the expected python version
"""
# expected version
e_ver = os.environ.get("PYTHON_VERSION") or os.environ.get("TRAVIS_PYTHON_VERSION")
# Installed version
i_ver = platform.python_version()

assert e_ver is None or i_ver.startswith(e_ver)

0 comments on commit 44ee680

Please sign in to comment.