Skip to content

Add patch version in container #83

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 5 commits into from
Aug 4, 2022
Merged
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
8 changes: 1 addition & 7 deletions docker/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TARGETS := rust ubuntu centos
TARGETS := rust ubuntu

all: build
build: $(foreach TARGET,$(TARGETS),build/$(TARGET))
@@ -10,14 +10,8 @@ build/rust:
build/ubuntu:
$(MAKE) -f ubuntu.mk build

build/centos:
$(MAKE) -f centos.mk build

push/rust: build/rust
$(MAKE) -f rust.mk push

push/ubuntu: build/ubuntu
$(MAKE) -f ubuntu.mk push

push/centos: build/centos
$(MAKE) -f centos.mk push
3 changes: 0 additions & 3 deletions docker/centos.mk

This file was deleted.

7 changes: 4 additions & 3 deletions docker/common.mk
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
TOP := $(shell git rev-parse --show-toplevel)
HERE := $(TOP)/docker

REGISTRY := ghcr.io/rust-math/intel-mkl-src
REGISTRY := ghcr.io/rust-math/intel-mkl-src
RUST_VERSION := 1.56.0
PATCH_VERSION := 1

all: build

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

push: build
docker push $(REGISTRY)/$(TARGET):$(RUST_VERSION)
docker push $(REGISTRY)/$(TARGET):$(RUST_VERSION)-$(PATCH_VERSION)
2 changes: 2 additions & 0 deletions docker/intel-mkl.conf
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
/opt/intel/lib/intel64
/opt/intel/lib/intel64_lin
/opt/intel/mkl/lib/intel64
/opt/intel/mkl/lib/intel64_lin
23 changes: 0 additions & 23 deletions docker/mkl-centos.Dockerfile

This file was deleted.

4 changes: 3 additions & 1 deletion docker/mkl-rust.Dockerfile
Original file line number Diff line number Diff line change
@@ -26,7 +26,9 @@ RUN ldconfig
ENV PKG_CONFIG_PATH /opt/intel/mkl/bin/pkgconfig
RUN sed -i "s/MKLROOT/prefix/g" ${PKG_CONFIG_PATH}/*.pc

# Setup basic rust development tools
WORKDIR /src
RUN chmod -R a+w /src

# Setup basic rust development tools
RUN cargo install cargo-tarpaulin
RUN rustup component add rustfmt clippy
29 changes: 14 additions & 15 deletions docker/mkl-ubuntu.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,35 @@
# Ubuntu with official apt install procedure
# Ubuntu 20.04 with apt

FROM ubuntu:18.04
FROM ubuntu:20.04

# workaround for tzdata
ENV DEBIAN_FRONTEND=noninteractive

RUN apt update \
&& apt install -y \
apt-utils \
curl \
gcc \
gnupg \
intel-mkl \
libssl-dev \
pkg-config \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Install MKL
# https://software.intel.com/content/www/us/en/develop/articles/installing-intel-free-libs-and-python-apt-repo.html
RUN curl -sfL https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2019.PUB | apt-key add -
RUN curl -sfL https://apt.repos.intel.com/setup/intelproducts.list -o /etc/apt/sources.list.d/intelproducts.list

RUN apt update \
&& apt install -y intel-mkl-2020.0.088 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# Setup Rust
# From official setting in https://github.com/rust-lang/docker-rust
ARG RUST_VERSION
ENV RUSTUP_HOME=/usr/local/rustup
ENV CARGO_HOME=/usr/local/cargo
ENV PATH=/usr/local/cargo/bin:$PATH
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain ${RUST_VERSION}
# this may concern security issue for production use, but this container is designed for development use.
RUN chmod -R a+w $RUSTUP_HOME $CARGO_HOME

WORKDIR /src
RUN chmod -R a+w /src

# this may concern security issue for production use, but this container is designed for development use.
RUN chmod -R a+w $RUSTUP_HOME $CARGO_HOME /src

# Setup basic rust development tools
RUN cargo install cargo-tarpaulin
RUN rustup component add rustfmt clippy