Skip to content

Commit

Permalink
Update Docker file (#2899)
Browse files Browse the repository at this point in the history
* pull only from conda-forge, syntax and version updates

* update syntax for env

* try reverting back to conda

* optimize placement of docker statement to avoid re-downloads

* clear warning

* undo accidental commit
  • Loading branch information
david-cortes-intel authored Sep 25, 2024
1 parent 890d98f commit 359c9c3
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 27 deletions.
14 changes: 6 additions & 8 deletions .ci/env/apt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,15 @@ function update {
}

function add_repo {
wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
rm GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB
echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo add-apt-repository -y "deb https://apt.repos.intel.com/oneapi all main"
sudo apt-get update
wget -O- https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS.PUB | \
gpg --dearmor | sudo tee /usr/share/keyrings/oneapi-archive-keyring.gpg > /dev/null
echo "deb [signed-by=/usr/share/keyrings/oneapi-archive-keyring.gpg] https://apt.repos.intel.com/oneapi all main" \
| sudo tee /etc/apt/sources.list.d/oneAPI.list
sudo apt update
}

function install_dpcpp {
sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-2024.2
sudo bash -c 'echo libintelocl.so > /etc/OpenCL/vendors/intel-cpu.icd'
sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp intel-oneapi-runtime-libs
}

function install_mkl {
Expand Down
1 change: 0 additions & 1 deletion .ci/env/environment.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: ci-env
channels:
- conda-forge
- defaults
dependencies:
- impi-devel=2021.12.0
15 changes: 10 additions & 5 deletions dev/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,18 @@
*******************************************************************************/-->

# Docker Development Environment

## How To Use

There is a simple docker dev environment for the oneDAL development and build process.
It includes dependencies for building all oneDAL components with ``make`` and ``bazel``

Note: The docker setup assumes that it is executed from the oneDAL repo and copies repo files inside the container
Note: The docker setup assumes that it is executed from the oneDAL repo and copies repo files inside the container. In order to build the container locally from the root of the `oneDAL` repository, execute the following:
```shell
docker build -t onedal-dev -f dev/docker/onedal-dev.Dockerfile .
```

For that, run:
```sh
docker run -it onedal-dev /bin/bash
```
Then, in order to use the container interactively, run:
```shell
docker run -it onedal-dev /bin/bash
```
25 changes: 12 additions & 13 deletions dev/docker/onedal-dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,28 @@
FROM ubuntu:22.04@sha256:adbb90115a21969d2fe6fa7f9af4253e16d45f8d4c1e930182610c4731962658

ARG workdirectory="/sources/oneDAL"

COPY . ${workdirectory}

WORKDIR ${workdirectory}

#Env setup
RUN apt-get update && \
apt-get -y install sudo wget gnupg git make python3-setuptools doxygen
apt-get -y install sudo wget gnupg git make python3-setuptools doxygen software-properties-common

# Install miniconda
ENV CONDA_DIR /opt/conda
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda
ENV CONDA_DIR=/opt/conda
RUN wget --quiet \
"https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh" && \
bash Miniforge3* -b -p /opt/conda

# Put conda in path to use conda activate
ENV PATH=$CONDA_DIR/bin:$PATH

# Installing environment for bazel
RUN wget https://github.com/bazelbuild/bazelisk/releases/download/v1.18.0/bazelisk-linux-amd64 && \
chmod 755 bazelisk-linux-amd64 && \
mv bazelisk-linux-amd64 /usr/bin/bazel

COPY . ${workdirectory}

# Installing environment for base development dependencies
RUN .ci/env/apt.sh dev-base

Expand All @@ -43,11 +48,6 @@ RUN .ci/env/apt.sh dpcpp
# Installing environment for clang-format
RUN .ci/env/apt.sh clang-format

# Installing environment for bazel
RUN wget https://github.com/bazelbuild/bazelisk/releases/download/v1.18.0/bazelisk-linux-amd64 && \
chmod 755 bazelisk-linux-amd64 && \
mv bazelisk-linux-amd64 /usr/bin/bazel

# Installing openBLAS dependency
RUN .ci/env/openblas.sh

Expand All @@ -56,4 +56,3 @@ RUN ./dev/download_micromkl.sh

# Installing oneTBB dependency
RUN ./dev/download_tbb.sh

0 comments on commit 359c9c3

Please sign in to comment.