-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from rust-math/test-env-docker
Create MKL-enabled Rust container
- Loading branch information
Showing
4 changed files
with
65 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
FROM rust:latest | ||
LABEL maintainer "Toshiki Teramura <[email protected]>" | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |