Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create MKL-enabled Rust container #36

Merged
merged 3 commits into from
Jun 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,21 @@
FROM rust:latest
LABEL maintainer "Toshiki Teramura <toshiki.teramura@gmail.com>"
ARG RUST_VERSION
FROM rust:${RUST_VERSION}
ARG MKL_VERSION

COPY install.sh /
RUN /install.sh && apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR /mkl

ENV PKG_CONFIG_PATH /opt/intel/compilers_and_libraries/linux/mkl/bin/pkgconfig
ENV LD_LIBRARY_PATH /opt/intel/compilers_and_libraries/linux/mkl/lib/intel64
RUN apt update \
&& apt install -y cpio \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

COPY ./silent.cfg /mkl/
RUN curl -sfLO http://registrationcenter-download.intel.com/akdlm/irc_nas/tec/16533/l_mkl_${MKL_VERSION}.tgz \
&& tar xf l_mkl_${MKL_VERSION}.tgz \
&& cd l_mkl_${MKL_VERSION} \
&& ./install.sh -s ../silent.cfg \
&& rm -rf /mkl
ENV PKG_CONFIG_PATH /opt/intel/mkl/bin/pkgconfig
RUN sed -i "s/MKLROOT/prefix/g" ${PKG_CONFIG_PATH}/*.pc

WORKDIR /src
22 changes: 14 additions & 8 deletions ci/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
REGISTRY := rustmath/mkl
REGISTRY := rustmath/mkl-rust
RUST_VERSION := 1.43.0
MKL_VERSION := 2020.1.217
IMAGE := $(REGISTRY):$(RUST_VERSION)-$(MKL_VERSION)

all: image
all: test

image:
docker build . -t $(REGISTRY)
build:
docker build . \
--build-arg "RUST_VERSION=$(RUST_VERSION)" \
--build-arg "MKL_VERSION=$(MKL_VERSION)" \
-t $(IMAGE)

push: image
docker push $(REGISTRY)
push: build
docker push $(IMAGE)

run: image
docker run -it --rm $(REGISTRY)
test: build
docker run -it --rm $(IMAGE) pkg-config --libs mkl-dynamic-lp64-iomp
10 changes: 0 additions & 10 deletions ci/install.sh

This file was deleted.

34 changes: 34 additions & 0 deletions ci/silent.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Patterns used to check silent configuration file
#
# anythingpat - any string
# filepat - the file location pattern (/file/location/to/license.lic)
# lspat - the license server address pattern (0123@hostname)
# snpat - the serial number pattern (ABCD-01234567)
# comppat - the component abbreviation (intel-component-0123.4-567__arch), use installer command line option to get it

# Accept EULA, valid values are: {accept, decline}
ACCEPT_EULA=accept

# Optional error behavior, valid values are: {yes, no}
CONTINUE_WITH_OPTIONAL_ERROR=yes

# Install location, valid values are: {/opt/intel, filepat}
PSET_INSTALL_DIR=/opt/intel

# Continue with overwrite of existing installation directory, valid values are: {yes, no}
CONTINUE_WITH_INSTALLDIR_OVERWRITE=yes

# List of components to install (use semicolon to separate the components), valid values are: {ALL, DEFAULTS, comppat}
COMPONENTS=DEFAULTS

# Installation mode, valid values are: {install, repair, uninstall}
PSET_MODE=install

# Path to the cluster description file, valid values are: {filepat}
#CLUSTER_INSTALL_MACHINES_FILE=filepat

# Perform validation of digital signatures of RPM files, valid values are: {yes, no}
SIGNING_ENABLED=yes

# Select target architecture of your applications, valid values are: {IA32, INTEL64, ALL}
ARCH_SELECTED=INTEL64