-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create a dedicated docker image for ArcticDB development (#2086)
#### Reference Issues/PRs #2081 #### What does this implement or fix? This PR aims to: - create a docker image with the dev dependencies - create a workflow to push it automatically to the github registry - remove the use of the action that installs the dependencies manually and use the new docker image Successful manual run of the benchmark flow can be seen [here](https://github.com/man-group/ArcticDB/actions/runs/12411871191). It needed to be run manually because the changes to the workflow file are not picked up correctly in the automatic run here. #### Any other comments? #### Checklist <details> <summary> Checklist for code changes... </summary> - [ ] Have you updated the relevant docstrings, documentation and copyright notice? - [ ] Is this contribution tested against [all ArcticDB's features](../docs/mkdocs/docs/technical/contributing.md)? - [ ] Do all exceptions introduced raise appropriate [error messages](https://docs.arcticdb.io/error_messages/)? - [ ] Are API changes highlighted in the PR description? - [ ] Is the PR labelled as enhancement or bug so it appears in autogenerated release notes? </details> <!-- Thanks for contributing a Pull Request to ArcticDB! Please ensure you have taken a look at: - ArcticDB's Code of Conduct: https://github.com/man-group/ArcticDB/blob/master/CODE_OF_CONDUCT.md - ArcticDB's Contribution Licensing: https://github.com/man-group/ArcticDB/blob/master/docs/mkdocs/docs/technical/contributing.md#contribution-licensing -->
- Loading branch information
1 parent
159d930
commit 6371256
Showing
7 changed files
with
81 additions
and
57 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains 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 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 |
---|---|---|
|
@@ -5,6 +5,7 @@ on: | |
run_all_benchmarks: {required: true, type: boolean, description: Run all benchmarks or just the one for the given commit} | ||
commit: {required: true, type: string, description: commit hash that will be benchmarked} | ||
run_on_pr_head: {required: false, default: false, type: boolean, description: Specifies if the benchmark should run on PR head branch} | ||
dev_image_tag: {required: false, default: 'latest', type: string, description: Tag of the ArcticDB development image} | ||
jobs: | ||
start_ec2_runner: | ||
uses: ./.github/workflows/ec2_runner_jobs.yml | ||
|
@@ -19,7 +20,7 @@ jobs: | |
always() && | ||
!cancelled() | ||
runs-on: ${{ needs.start_ec2_runner.outputs.label }} | ||
container: quay.io/pypa/manylinux_2_28_x86_64:latest | ||
container: ghcr.io/man-group/arcticdb-dev:${{ inputs.dev_image_tag }} | ||
env: | ||
# this is potentially overflowing the cache, so should be looked into after we address issue #1057 | ||
SCCACHE_GHA_VERSION: ${{vars.SCCACHE_GHA_VERSION || 1}} # Setting this env var enables the caching | ||
|
@@ -31,11 +32,6 @@ jobs: | |
defaults: | ||
run: {shell: bash} | ||
steps: | ||
- name: Initialize LFS | ||
shell: bash -l {0} | ||
run: | | ||
dnf install -y git-lfs | ||
- uses: actions/[email protected] | ||
with: | ||
lfs: 'true' | ||
|
@@ -48,9 +44,6 @@ jobs: | |
uses: mozilla-actions/[email protected] | ||
with: | ||
version: "v0.4.0" | ||
|
||
- name: Install deps | ||
uses: ./.github/actions/setup_deps | ||
|
||
- name: Extra envs | ||
shell: bash -l {0} | ||
|
This file contains 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 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 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,43 @@ | ||
name: Docker Image for Development | ||
on: | ||
# should support manual trigger and PRs to the Dockerfile | ||
push: | ||
paths: | ||
- 'docker/**' | ||
- '.github/workflows/dev_docker_image.yml' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build_and_push: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
packages: write | ||
steps: | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Choose image tag | ||
run: | | ||
sha=$(git rev-parse --short HEAD) | ||
image_ver="$(date '+%Y%m%d')-${sha}" | ||
image_name="ghcr.io/man-group/arcticdb-dev" | ||
echo -e "image_ver=$image_ver\nimage_name=$image_name\noutput_tag=$image_name:$image_ver" | tee -a $GITHUB_ENV | ||
- name: Build Docker image | ||
run: | | ||
docker build -t $image_name . -f docker/Dockerfile | ||
- name: Login to GHCR | ||
run: docker login ghcr.io -u token -p "${{secrets.GITHUB_TOKEN}}" | ||
|
||
- name: Publish Docker versioned image to GHCR | ||
run: | | ||
docker tag $image_name $image_name:$image_ver | ||
docker push $image_name:$image_ver | ||
- name: Publish Docker image to GHCR as latest | ||
if: github.ref == 'refs/heads/master' | ||
run: | | ||
docker tag $image_name $image_name:latest | ||
docker push $image_name:latest |
This file contains 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,26 @@ | ||
FROM quay.io/pypa/manylinux_2_28_x86_64 | ||
|
||
RUN dnf update -y | ||
RUN dnf remove -y 'gcc-toolset-*' | ||
RUN dnf install -y zip flex bison gcc-toolset-10 gcc-toolset-10-gdb gcc-toolset-10-libatomic-devel krb5-devel cyrus-sasl-devel openssl-devel \ | ||
unzip tar epel-release jq wget libcurl-devel git-lfs \ | ||
python3.11-devel python3.11-pip perl-IPC-Cmd | ||
|
||
RUN dnf groupinstall -y 'Development Tools' | ||
RUN dnf install -y mono-complete | ||
|
||
RUN dnf clean all | ||
|
||
RUN wget -nv https://github.com/mozilla/sccache/releases/download/v0.8.2/sccache-v0.8.2-x86_64-unknown-linux-musl.tar.gz | ||
RUN tar xvf sccache*.tar.gz | ||
RUN mv sccache-*/sccache . | ||
RUN chmod 555 sccache | ||
|
||
RUN cp sccache /usr/local/bin/ | ||
|
||
ENV CC=/opt/rh/gcc-toolset-10/root/bin/gcc | ||
ENV CMAKE_C_COMPILER=/opt/rh/gcc-toolset-10/root/bin/gcc | ||
ENV CXX=/opt/rh/gcc-toolset-10/root/bin/g++ | ||
ENV CMAKE_CXX_COMPILER=/opt/rh/gcc-toolset-10/root/bin/g++ | ||
ENV LD_LIBRARY_PATH=/opt/rh/gcc-toolset-10/root/usr/lib64:/opt/rh/gcc-toolset-10/root/usr/lib:/opt/rh/gcc-toolset-10/root/usr/lib64/dyninst | ||
ENV PATH=/opt/rh/devtoolset-10/root/usr/bin:/opt/python/cp311-cp311/bin:${PATH} |