-
Notifications
You must be signed in to change notification settings - Fork 790
[CI] Introduce driver and nightly containers #4777
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
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
54b6902
[CI] Introduce driver and nightly containers
alexbatashev 96846ee
fix users
alexbatashev 4e474c4
only latest docker container
alexbatashev b99231a
only create latest driver versions build
alexbatashev 36c972c
add no-driver variant
4bd14ed
Merge branch 'add_more_sycl_containers' of github.com:alexbatashev/ll…
4fc279a
address feedback
alexbatashev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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,55 @@ | ||
name: SYCL Nightly Builds | ||
|
||
on: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 3 * * *' | ||
|
||
jobs: | ||
ubuntu2004_build_test: | ||
if: github.repository == 'intel/llvm' | ||
uses: intel/llvm/.github/workflows/sycl_linux_build_and_test.yml@sycl | ||
with: | ||
build_github_cache: true | ||
build_cache_root: ${{ github.workspace }} | ||
build_artifact_suffix: default | ||
ubuntu2004_docker_build_push: | ||
if: github.repository == 'intel/llvm' | ||
runs-on: ubuntu-latest | ||
needs: ubuntu2004_build_test | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/download-artifact@v2 | ||
with: | ||
name: sycl_nightly_ubuntu2004 | ||
path: devops/ | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.repository_owner }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build and Push Container (with drivers) | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
build-args: | | ||
base_image=ghcr.io/intel/llvm/ubuntu2004_intel_drivers | ||
base_tag=latest | ||
tags: | | ||
ghcr.io/${{ github.repository }}/sycl_ubuntu2004_nightly:${{ github.sha }} | ||
ghcr.io/${{ github.repository }}/sycl_ubuntu2004_nightly:latest | ||
context: ${{ github.workspace }}/devops | ||
file: ${{ github.workspace }}/devops/containers/ubuntu2004_preinstalled.Dockerfile | ||
- name: Build and Push Container (no drivers) | ||
uses: docker/build-push-action@v2 | ||
with: | ||
push: true | ||
build-args: | | ||
base_image=ghcr.io/intel/llvm/ubuntu2004_base | ||
base_tag=latest | ||
tags: | | ||
ghcr.io/${{ github.repository }}/sycl_ubuntu2004_nightly:no-drivers-${{ github.sha }} | ||
ghcr.io/${{ github.repository }}/sycl_ubuntu2004_nightly:no-drivers | ||
context: ${{ github.workspace }}/devops | ||
file: ${{ github.workspace }}/devops/containers/ubuntu2004_preinstalled.Dockerfile |
This file contains hidden or 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,64 @@ | ||
ARG base_tag=latest | ||
ARG base_image=ghcr.io/intel/llvm/ubuntu2004_base | ||
|
||
FROM $base_image:$base_tag | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
ARG compute_runtime_tag=latest | ||
ARG igc_tag=latest | ||
ARG tbb_tag=latest | ||
ARG fpgaemu_tag=latest | ||
ARG cpu_tag=latest | ||
|
||
RUN apt update && apt install -yqq wget | ||
|
||
COPY scripts/get_release.py / | ||
|
||
# Install IGC and NEO | ||
RUN python3 /get_release.py intel/intel-graphics-compiler $igc_tag \ | ||
| grep ".*deb" \ | ||
| wget -qi - && \ | ||
python3 /get_release.py intel/compute-runtime $compute_runtime_tag \ | ||
| grep -E ".*((deb)|(sum))" \ | ||
| wget -qi - && \ | ||
sha256sum -c *.sum &&\ | ||
dpkg -i *.deb && rm *.deb *.sum | ||
|
||
RUN mkdir /runtimes | ||
|
||
# Install TBB | ||
RUN cd /runtimes && \ | ||
python3 /get_release.py oneapi-src/onetbb $tbb_tag \ | ||
| grep -E ".*-lin.tgz" \ | ||
| wget -qi - && \ | ||
tar -xf *.tgz && rm *.tgz && mv oneapi-tbb-* oneapi-tbb | ||
|
||
# Install Intel FPGA Emulator | ||
RUN cd /runtimes && \ | ||
python3 /get_release.py intel/llvm $fpgaemu_tag \ | ||
| grep -E ".*fpgaemu.*tar.gz" \ | ||
| wget -qi - && \ | ||
mkdir fpgaemu && tar -xf *.tar.gz -C fpgaemu && rm *.tar.gz && \ | ||
if [ -e /runtimes/fpgaemu/install.sh ]; then \ | ||
bash -x /runtimes/fpgaemu/install.sh ; \ | ||
else \ | ||
echo /runtimes/fpgaemu/x64/libintelocl_emu.so > /etc/OpenCL/vendors/intel_fpgaemu.icd ; \ | ||
fi | ||
|
||
# Install Intel OpenCL CPU Runtime | ||
RUN cd /runtimes && \ | ||
python3 /get_release.py intel/llvm $cpu_tag \ | ||
| grep -E ".*oclcpuexp.*tar.gz" \ | ||
| wget -qi - && \ | ||
mkdir oclcpu && tar -xf *.tar.gz -C oclcpu && rm *.tar.gz && \ | ||
if [ -e /runtimes/oclcpu/install.sh ]; then \ | ||
bash -x /runtimes/oclcpu/install.sh ; \ | ||
else \ | ||
echo /runtimes/oclcpu/x64/libintelocl.so > /etc/OpenCL/vendors/intel_oclcpu.icd ; \ | ||
fi | ||
|
||
COPY scripts/drivers_entrypoint.sh /drivers_entrypoint.sh | ||
|
||
ENTRYPOINT ["/bin/bash", "/drivers_entrypoint.sh"] | ||
|
This file contains hidden or 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,10 @@ | ||
ARG base_tag=latest | ||
ARG base_image=ghcr.io/intel/llvm/ubuntu2004_intel_drivers | ||
|
||
FROM $base_image:$base_tag | ||
|
||
COPY scripts/drivers_entrypoint.sh /drivers_entrypoint.sh | ||
ADD llvm_sycl.tar.gz /usr | ||
|
||
ENTRYPOINT ["/bin/bash", "/drivers_entrypoint.sh"] | ||
|
This file contains hidden or 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,6 @@ | ||
#!/bin/bash | ||
|
||
source /runtimes/oneapi-tbb/env/vars.sh | ||
|
||
exec "$@" | ||
|
This file contains hidden or 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,23 @@ | ||
from urllib.request import urlopen | ||
import json | ||
import sys | ||
|
||
def get_release_by_tag(repo, tag): | ||
release = urlopen("https://api.github.com/repos/" + repo + "/releases/tags/" + tag).read() | ||
return json.loads(release) | ||
|
||
def get_latest_release(repo): | ||
release = urlopen("https://api.github.com/repos/" + repo + "/releases/latest").read() | ||
return json.loads(release) | ||
|
||
repo = sys.argv[1] | ||
tag = sys.argv[2] | ||
|
||
if tag == "latest": | ||
release = get_latest_release(repo) | ||
else: | ||
release = get_release_by_tag(repo, tag) | ||
|
||
for item in release["assets"]: | ||
print(item["browser_download_url"]) | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, we should save the time on checking out sources by using an image where some old SHA is checked out already and we need just update it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure saving 1 minute on a 1,5 hour build is a significant improvement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe not significant, but still an improvement!
I'm okay to get back to this after we configure everything else.