Skip to content

Container with Rust 1.49, and move to GitHub Container Registry #60

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

Merged
merged 13 commits into from
Apr 10, 2021
Merged
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Unreleased
-----------

### Changed

- Repository of container image has been moved to GitHub Container Registry (ghcr.io) from DockerHub https://github.com/rust-math/intel-mkl-src/pull/60

0.6.0+mkl2020.1 - 2020-06-23
=============================

Expand Down
39 changes: 17 additions & 22 deletions docker/Makefile
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
REGISTRY := rustmath
RUST_VERSION := 1.43.0
TARGETS := rust ubuntu centos

all: test ubuntu centos
all: build
build: $(foreach TARGET,$(TARGETS),build/$(TARGET))
push: $(foreach TARGET,$(TARGETS),push/$(TARGET))

build:
docker build . \
--build-arg "RUST_VERSION=$(RUST_VERSION)" \
-t $(REGISTRY)/mkl-rust:$(RUST_VERSION)
build/rust:
$(MAKE) -f rust.mk build

push: build ubuntu centos
docker push $(REGISTRY)/mkl-rust:$(RUST_VERSION)
docker push $(REGISTRY)/mkl-centos:$(RUST_VERSION)
docker push $(REGISTRY)/mkl-ubuntu:$(RUST_VERSION)
build/ubuntu:
$(MAKE) -f ubuntu.mk build

test: build
docker run -it --rm $(REGISTRY)/mkl-rust:$(RUST_VERSION) pkg-config --libs mkl-dynamic-lp64-iomp
docker run -it --rm $(REGISTRY)/mkl-rust:$(RUST_VERSION) ldconfig -p | grep mkl
build/centos:
$(MAKE) -f centos.mk build

ubuntu:
docker build . -f [email protected] \
--build-arg "RUST_VERSION=$(RUST_VERSION)" \
-t $(REGISTRY)/mkl-ubuntu:$(RUST_VERSION)
push/rust: build/rust
$(MAKE) -f rust.mk push

centos:
docker build . -f [email protected] \
--build-arg "RUST_VERSION=$(RUST_VERSION)" \
-t $(REGISTRY)/mkl-centos:$(RUST_VERSION)
push/ubuntu: build/ubuntu
$(MAKE) -f ubuntu.mk push

push/centos: build/centos
$(MAKE) -f centos.mk push
3 changes: 3 additions & 0 deletions docker/centos.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
HERE := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
TARGET := mkl-centos
include $(HERE)/common.mk
16 changes: 16 additions & 0 deletions docker/common.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
TOP := $(shell git rev-parse --show-toplevel)
HERE := $(TOP)/docker

REGISTRY := ghcr.io/rust-math/intel-mkl-src
RUST_VERSION := 1.49.0

all: build

build:
docker build $(HERE) \
--build-arg "RUST_VERSION=$(RUST_VERSION)" \
-t $(REGISTRY)/$(TARGET):$(RUST_VERSION) \
-f $(TARGET).Dockerfile

push: build
docker push $(REGISTRY)/$(TARGET):$(RUST_VERSION)
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions docker/rust.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
HERE := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
TARGET := mkl-rust
include $(HERE)/common.mk
3 changes: 3 additions & 0 deletions docker/ubuntu.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
HERE := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
TARGET := mkl-ubuntu
include $(HERE)/common.mk
13 changes: 7 additions & 6 deletions intel-mkl-tool/Makefile
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
HERE := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
RUST_VERSION := 1.43.0
REGISTRY := ghcr.io/rust-math/intel-mkl-src
RUST_VERSION := 1.49.0
DOCKER_OPTION := --rm -u $(shell id -u):$(shell id -g) -v $(HERE):/src

test:
docker run $(DOCKER_OPTION) --env CARGO_HOME=/src/.cargo-cache rustmath/mkl-rust:$(RUST_VERSION) cargo test with_mkl -- --ignored
docker run $(DOCKER_OPTION) --env CARGO_HOME=/src/.cargo-cache $(REGISTRY)/mkl-rust:$(RUST_VERSION) cargo test with_mkl -- --ignored

seek:
docker run $(DOCKER_OPTION) --env CARGO_HOME=/src/.cargo-cache rustmath/mkl-rust:$(RUST_VERSION) cargo run --release -- seek
docker run $(DOCKER_OPTION) --env CARGO_HOME=/src/.cargo-cache $(REGISTRY)/mkl-rust:$(RUST_VERSION) cargo run --release -- seek

package:
docker run $(DOCKER_OPTION) --env CARGO_HOME=/src/.cargo-cache rustmath/mkl-rust:$(RUST_VERSION) cargo run --release -- package
docker run $(DOCKER_OPTION) --env CARGO_HOME=/src/.cargo-cache $(REGISTRY)/mkl-rust:$(RUST_VERSION) cargo run --release -- package

seek-ubuntu:
docker run $(DOCKER_OPTION) --env CARGO_HOME=/src/.cargo-ubuntu rustmath/mkl-ubuntu:$(RUST_VERSION) cargo run --release -- seek
docker run $(DOCKER_OPTION) --env CARGO_HOME=/src/.cargo-ubuntu $(REGISTRY)/mkl-ubuntu:$(RUST_VERSION) cargo run --release -- seek

seek-centos:
docker run $(DOCKER_OPTION) --env CARGO_HOME=/src/.cargo-centos rustmath/mkl-centos:$(RUST_VERSION) cargo run --release -- seek
docker run $(DOCKER_OPTION) --env CARGO_HOME=/src/.cargo-centos $(REGISTRY)/mkl-centos:$(RUST_VERSION) cargo run --release -- seek