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

Add intel mkl #69

Merged
merged 2 commits into from
Sep 2, 2022
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
20 changes: 10 additions & 10 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- run: |
source ./tool.sh
build_image core latest docker_core/Dockerfile \
--build-arg "ARG_PROFILE_PYTHON=base,datascience,database,nlp,cv,chem,tf2,torch" \
--build-arg "ARG_PROFILE_PYTHON=base,datascience,mkl,database,nlp,cv,chem,tf2,torch" \
--build-arg "ARG_PROFILE_R=base,datascience,rstudio,rshiny" \
--build-arg "ARG_PROFILE_NODEJS=base" \
--build-arg "ARG_PROFILE_JAVA=base,maven" \
Expand All @@ -51,31 +51,31 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: source ./tool.sh && build_image py-data latest docker_core/Dockerfile --build-arg "ARG_PROFILE_PYTHON=datascience,database" && push_image
- run: source ./tool.sh && build_image py-data latest docker_core/Dockerfile --build-arg "ARG_PROFILE_PYTHON=datascience,mkl,database" && push_image

qpod_py-chem:
name: qpod/py-chem
needs: qpod_base
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: source ./tool.sh && build_image py-chem latest docker_core/Dockerfile --build-arg "ARG_PROFILE_PYTHON=datascience,chem" && push_image
- run: source ./tool.sh && build_image py-chem latest docker_core/Dockerfile --build-arg "ARG_PROFILE_PYTHON=datascience,mkl,chem" && push_image

qpod_py-std:
name: qpod/py-std
needs: qpod_base
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: source ./tool.sh && build_image py-std latest docker_core/Dockerfile --build-arg "ARG_PROFILE_PYTHON=datascience,database,nlp,cv,chem" && push_image
- run: source ./tool.sh && build_image py-std latest docker_core/Dockerfile --build-arg "ARG_PROFILE_PYTHON=datascience,mkl,database,nlp,cv,chem" && push_image

qpod_py-jdk:
name: qpod/py-jdk
needs: qpod_base
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: source ./tool.sh && build_image py-jdk latest docker_core/Dockerfile --build-arg "ARG_PROFILE_PYTHON=datascience,database,nlp,cv,chem" --build-arg "ARG_PROFILE_JAVA=base" && push_image
- run: source ./tool.sh && build_image py-jdk latest docker_core/Dockerfile --build-arg "ARG_PROFILE_PYTHON=datascience,mkl,database,nlp,cv,chem" --build-arg "ARG_PROFILE_JAVA=base" && push_image

qpod_r-base:
name: qpod/r-base
Expand Down Expand Up @@ -263,7 +263,7 @@ jobs:
- uses: actions/checkout@v2
- run: |
source ./tool.sh
build_image paddle-cuda116 latest docker_core/Dockerfile --build-arg "BASE_IMG=cuda_11.6" --build-arg "ARG_PROFILE_PYTHON=paddle"
build_image paddle-cuda116 latest docker_core/Dockerfile --build-arg "BASE_IMG=cuda_11.6" --build-arg "ARG_PROFILE_PYTHON=paddle,mkl"
alias_image paddle-cuda116 latest paddle latest
push_image

Expand All @@ -275,7 +275,7 @@ jobs:
- uses: actions/checkout@v2
- run: |
source ./tool.sh
build_image paddle-cuda102 latest docker_core/Dockerfile --build-arg "BASE_IMG=cuda_10.2" --build-arg "ARG_PROFILE_PYTHON=paddle"
build_image paddle-cuda102 latest docker_core/Dockerfile --build-arg "BASE_IMG=cuda_10.2" --build-arg "ARG_PROFILE_PYTHON=paddle,mkl"
push_image


Expand All @@ -287,7 +287,7 @@ jobs:
- uses: actions/checkout@v2
- run: |
source ./tool.sh
build_image py-nlp latest docker_core/Dockerfile --build-arg "BASE_IMG=cuda_11.6" --build-arg "ARG_PROFILE_PYTHON=datascience,torch,nlp"
build_image py-nlp latest docker_core/Dockerfile --build-arg "BASE_IMG=cuda_11.6" --build-arg "ARG_PROFILE_PYTHON=datascience,mkl,torch,nlp"
push_image

qpod_py-cv:
Expand All @@ -298,7 +298,7 @@ jobs:
- uses: actions/checkout@v2
- run: |
source ./tool.sh
build_image py-cv latest docker_core/Dockerfile --build-arg "BASE_IMG=cuda_11.6" --build-arg "ARG_PROFILE_PYTHON=datascience,torch,cv"
build_image py-cv latest docker_core/Dockerfile --build-arg "BASE_IMG=cuda_11.6" --build-arg "ARG_PROFILE_PYTHON=datascience,mkl,torch,cv"
push_image


Expand All @@ -312,7 +312,7 @@ jobs:
source ./tool.sh && free_diskspace
build_image full-cuda-11.6 latest docker_core/Dockerfile \
--build-arg "BASE_IMG=cuda_11.6" \
--build-arg "ARG_PROFILE_PYTHON=base,datascience,database,nlp,cv,chem,tf2,torch" \
--build-arg "ARG_PROFILE_PYTHON=base,datascience,mkl,database,nlp,cv,chem,tf2,torch" \
--build-arg "ARG_PROFILE_R=base,datascience,rstudio,rshiny" \
--build-arg "ARG_PROFILE_NODEJS=base" \
--build-arg "ARG_PROFILE_JAVA=base,maven" \
Expand Down
11 changes: 10 additions & 1 deletion docker_atom/work/script-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,23 @@ setup_mamba() {


setup_conda_postprocess() {
# If python exists, set pypi source
if [ -f "$(which python)" ]; then
cat >/etc/pip.conf <<EOF
[global]
progress_bar=off
root-user-action=ignore
EOF
fi

conda config --system --prepend channels conda-forge \
&& conda config --system --set auto_update_conda false \
&& conda config --system --set show_channel_urls true \
&& conda config --system --set report_errors false \
&& conda config --system --set channel_priority strict \
&& conda update --all --quiet --yes

# These conda pkgs shouldn't be removed (otherwise will cause RemoveError) since they are directly reqiuired by conda: pip setuptools pycosat pyopenssl requests ruamel_yaml
# These conda pkgs shouldn't be removed (otherwise will cause RemoveError) since they are directly required by conda: pip setuptools pycosat pyopenssl requests ruamel_yaml
CONDA_PY_PKGS=$(conda list | grep "py3" | cut -d " " -f 1 | sed "/#/d;/conda/d;/pip/d;/setuptools/d;/pycosat/d;/pyopenssl/d;/requests/d;/ruamel_yaml/d;") \
&& conda remove --force -yq "${CONDA_PY_PKGS}" \
&& pip install -UIq pip setuptools "${CONDA_PY_PKGS}"
Expand Down
9 changes: 7 additions & 2 deletions docker_core/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@ RUN source /opt/utils/script-utils.sh \
RUN source /opt/utils/script-setup.sh \
&& for profile in $(echo $ARG_PROFILE_R | tr "," "\n") ; do ( setup_R_${profile} ) ; done

# If on a x86_64 architecture and install data science pkgs, install MKL for acceleration; Installing conda packages if provided.
RUN $(grep -q "x86_64" <<< `arch`) && $(grep -q "datascience" <<< "${ARG_PROFILE_PYTHON}") && ( echo "mkl" >> /opt/utils/install_list.conda ) || echo "Skip MLK install." \
# If on a x86_64 architecture: 1) if mkl specified, install nomkl; 2) install conda packages as specified.
RUN $(grep -q "x86_64" <<< `arch`) && ( \
( $(grep -q "mkl" <<< "${ARG_PROFILE_PYTHON}") && \
( echo "mkl" >> /opt/utils/install_list_core.conda && echo "Install mkl.") || \
( echo "nomkl" >> /opt/utils/install_list_core.conda && echo "Install nomkl.") \
) \
) \
&& source /opt/utils/script-utils.sh && install_conda /opt/utils/install_list_core.conda

# If installing Python packages
Expand Down