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

docker-stacks and jupyterhub #718

Merged
merged 98 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
1f2b556
set the environment variables at the end,
paskino May 17, 2022
000ec9a
requirements for CIL
paskino May 17, 2022
7e42a95
do not run pip install after conda install
paskino May 17, 2022
9560bf5
do not set LD_LIBRARY_PATH
paskino May 17, 2022
ec6c98b
updates
paskino May 18, 2022
21978c2
updates for PSMR2022
paskino May 19, 2022
83d0df7
added CIL dependencies
paskino May 20, 2022
6352d47
readme updates
paskino May 20, 2022
5e9a790
add build command
paskino May 20, 2022
017e447
update build command
paskino May 21, 2022
e43b037
copy stuff at the end
paskino May 24, 2022
f5b0dc5
copy SIRF sources
paskino May 25, 2022
8c0e867
fix formatting
paskino Jun 23, 2022
0125633
wip
paskino Jul 7, 2022
92a0047
updates jupyterhub for Ubuntu 22.04
paskino Jan 23, 2023
7297b87
update readme
paskino Jan 23, 2023
06d4f21
removed old text
paskino Jan 23, 2023
b611c0e
add astra-toolbox
paskino Jan 24, 2023
52716e4
update to jupyterhub dockerfile
paskino Jan 25, 2023
6574861
update the BASE_IMAGE
paskino Jan 26, 2023
430b86d
install py3.9 and deal with consequences
paskino Mar 9, 2023
5cc13d0
simplify the dockerfile to reduce layers
paskino Mar 9, 2023
6187f11
add boost_python
paskino Mar 9, 2023
173d5c0
several updates
paskino Mar 14, 2023
a6800a5
mainly updates to instruction on jupyterhub image build
paskino Nov 23, 2023
7a8cbcd
remove set e from bash script
paskino Nov 23, 2023
e3abf7e
auto OMP_NUM_THREADS = cpu_count//2
casperdcl Nov 27, 2023
5b29dd8
add docker-stacks submodule, cleanup build
casperdcl Nov 27, 2023
c66e745
better image tags
casperdcl Nov 28, 2023
e4fb34a
update name of variable
paskino Nov 29, 2023
fbb69b9
safer directory switching
casperdcl Nov 28, 2023
f3aebea
update jupyterhub README
casperdcl Nov 28, 2023
df35364
add SIRF_IMAGE variable
paskino Dec 1, 2023
4164ddc
make SIRF_IMAGE configurable
casperdcl Dec 1, 2023
d02886e
fix some review comments
casperdcl Dec 13, 2023
5fbdb2d
migrate build to docker-stacks
casperdcl Jan 2, 2024
e416e34
build fixes & ccaching
casperdcl Jan 3, 2024
654b178
configurable cmake options
casperdcl Jan 4, 2024
a4491b7
fix build & test
casperdcl Jan 4, 2024
5990ce2
split CPU & GPU images
casperdcl Jan 4, 2024
6ebeb79
merge jupyterhub => docker
casperdcl Jan 4, 2024
44ddc58
mamba install cmake
casperdcl Jan 4, 2024
813dcd8
CIL-Demos and CIL-Exercises in workdir
casperdcl Jan 4, 2024
e5ef700
kill old docker
casperdcl Jan 4, 2024
94b162b
remove entrypoint, fix cmd
casperdcl Jan 4, 2024
5a11768
ninja build, fix CIL gpu/cpu/implicit deps
casperdcl Jan 4, 2024
05b277c
common build & runtime deps
casperdcl Jan 5, 2024
ffc3ba6
minor docker improvements
casperdcl Jan 5, 2024
61a25b8
local build
casperdcl Jan 5, 2024
f242861
revert SIRF_TAG v3.5.0 <= ignore-acq
casperdcl Jan 5, 2024
0a424da
misc docker tidy & fixes
casperdcl Jan 5, 2024
39d2a64
strict priority
casperdcl Jan 5, 2024
758edf7
fix password & mounts
casperdcl Jan 5, 2024
e08091e
some fixes and docs
casperdcl Jan 5, 2024
b34f1bd
fix UID, slight tidy
casperdcl Jan 5, 2024
d49c5b7
fix widgets
casperdcl Jan 5, 2024
2a418db
simplify build script
casperdcl Jan 5, 2024
3cd942b
compose.sh script options
casperdcl Jan 5, 2024
d312289
demos: remove unneeded GPU deps
casperdcl Jan 8, 2024
560558b
fix GPU build
casperdcl Jan 8, 2024
d43d518
fix ipywidgets again
casperdcl Jan 8, 2024
01ed0a0
cleanup started containers
casperdcl Jan 8, 2024
ff3f04c
CI: docker build CPU & GPU
casperdcl Jan 8, 2024
a4ec488
CI: fix & speedup build
casperdcl Jan 8, 2024
1911bfd
CI: drop travis
casperdcl Jan 8, 2024
466b6fb
avoid ccache bloat
casperdcl Jan 8, 2024
c743ac6
fix test return status
casperdcl Jan 8, 2024
f41979c
CI: fix empty ccache
casperdcl Jan 9, 2024
42f80ae
docker tags & pushing
casperdcl Jan 9, 2024
44a9f5a
better ccache
casperdcl Jan 9, 2024
39de615
minor fixes
casperdcl Jan 10, 2024
d714244
cron weekly & master devel builds
casperdcl Jan 10, 2024
e7fa024
drop #573 work-around
casperdcl Jan 18, 2024
f76e9b7
expose SIRF_DOWNLOAD_DATA_ARGS
casperdcl Jan 18, 2024
13e7067
compose: -U to disable cache update
casperdcl Jan 18, 2024
7813706
misc fixes & tidy
casperdcl Jan 23, 2024
8864a08
devel build with CIL
casperdcl Jan 26, 2024
a4ca9c5
compose binary & devel-gpu
casperdcl Jan 26, 2024
1ebf418
auto-gen help
casperdcl Jan 26, 2024
724c91b
fix GPU devel
casperdcl Feb 1, 2024
03c3206
added some docs in Readme
paskino Feb 14, 2024
188f8c1
update to python 3.10 and do not fail if Gadgetron tests cannot be run
paskino Feb 14, 2024
dfc9e20
install dxchange via conda
paskino Feb 14, 2024
0b93393
temporarily disable CIL test 11
paskino Feb 14, 2024
56a0db1
reenable tests as fixed in CIL
paskino Feb 15, 2024
056f186
set python version to 3.10 as string
paskino Feb 15, 2024
6823d86
test CIL PR
paskino Feb 15, 2024
25f6a14
revert to default volume mount
paskino Feb 15, 2024
4a93cac
[ci skip] update readme
paskino Feb 15, 2024
7e2573e
cleanup post-rebase
casperdcl Feb 20, 2024
d8a5249
customisable OMP_NUM_THREADS
casperdcl Feb 20, 2024
7cb3734
fix executable permissions
casperdcl Feb 20, 2024
ea73e05
CI: optimise devel build
casperdcl Feb 20, 2024
ac7f72f
docker docs
casperdcl Feb 20, 2024
04e266d
compose.sh: better help output
casperdcl Feb 20, 2024
ca0e4c3
merge dev docs
casperdcl Feb 21, 2024
69b0963
fix compose.sh -U
casperdcl Feb 21, 2024
aa0478b
CI: separate pull/build, don't cache devel
casperdcl Feb 21, 2024
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
13 changes: 3 additions & 10 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,24 @@ on:
- 'docker/Dockerfile'
- 'docker/*yml'
- '**.md'
- 'jupyterhub/**'
- 'VirtualBox/**'
- '.github/workflows/*docker*'
- 'CITATION.cff'
- '.mailmap'
- '.travis.yml'
- 'NOTICE.txt'
- 'LICENSE.txt'

pull_request:
branches: [ master ]
paths-ignore:
- 'docker/Dockerfile'
- 'docker/*yml'
- '**.md'
- 'jupyterhub/**'
- 'VirtualBox/**'
- '.github/workflows/*docker*'
- 'CITATION.cff'
- '.mailmap'
- '.travis.yml'
- 'NOTICE.txt'
- 'LICENSE.txt'


jobs:
build:

Expand Down Expand Up @@ -94,7 +87,7 @@ jobs:
esac

- name: install_dependencies
run:
run:
cd docker;
sudo bash raw-ubuntu.sh;
sudo bash build_essential-ubuntu.sh;
Expand Down Expand Up @@ -146,7 +139,7 @@ jobs:
cmake -S ${GITHUB_WORKSPACE} ${BUILD_FLAGS} ${EXTRA_BUILD_FLAGS} ${DEVEL_BUILD};
- name: build
shell: bash
run: |
run: |
cd ${GITHUB_WORKSPACE}/build;
source ~/virtualenv/bin/activate;
cmake --build . -j 2;
Expand All @@ -167,5 +160,5 @@ jobs:

- name: tests
shell: bash
run:
run:
bash docker/ctest_sirf.sh
177 changes: 177 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
name: docker
on:
pull_request:
branches: [master]
paths-ignore:
- '**.md'
- 'VirtualBox/**'
- '.github/workflows/c-cpp.yml'
- 'CITATION.cff'
- '.mailmap'
push:
branches: [master]
tags: ['v**']
paths-ignore:
- '**.md'
- 'VirtualBox/**'
- '.github/workflows/c-cpp.yml'
- 'CITATION.cff'
- '.mailmap'
schedule: [{cron: '37 13 * * SUN'}] # Sunday at 13:37
defaults:
run:
shell: bash -l {0}
jobs:
build:
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
strategy:
matrix:
type: [gpu, cpu]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.ref }} # fix SHA
- uses: docker/metadata-action@v5
id: meta
with:
images: |
synerbi/sirf
ghcr.io/synerbi/sirf
flavor: |
latest=auto
suffix=${{ matrix.type == 'gpu' && 'gpu,onlatest=true' || '' }}
tags: |
type=edge
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
labels: |
org.opencontainers.image.licenses=Apache-2.0${{ matrix.type == 'gpu' && ' AND BSD-3-Clause AND GPL-3.0' || '' }}
- uses: docker/login-action@v3
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/login-action@v3
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags')
with:
username: ${{ secrets.DOCKER_USR }}
password: ${{ secrets.DOCKER_PWD }}
- name: increase disk space
run: ./.github/workflows/GHA_increase_disk_space.sh
- name: cache
uses: actions/cache@v3
with:
key: ccache-docker-${{ matrix.type }}-${{ github.ref_name }}-${{ github.run_id }}
restore-keys: |
ccache-docker-${{ matrix.type }}-${{ github.ref_name }}
ccache-docker-${{ matrix.type }}
ccache-docker
ccache
path: docker/devel/.ccache
- id: pull
name: pull
run: |
suffix=${{ matrix.type == 'gpu' && '-gpu' || '' }}
# pull core image
core_image=ghcr.io/synerbi/sirf:core$suffix
docker pull $core_image || :
# pull sirf image
docker pull ghcr.io/synerbi/sirf:${{ fromJSON(steps.meta.outputs.json).tags[0] }} || :
echo "suffix=$suffix" >> "$GITHUB_OUTPUT"
echo "core_image=$core_image" >> "$GITHUB_OUTPUT"
- id: build
name: build
run: |
# rebuild sirf image
./docker/compose.sh -bR${{ matrix.type == 'gpu' && 'g' || 'c' }}
image=synerbi/sirf:jupyter${{ steps.pull.outputs.suffix }}
echo "image=$image" >> "$GITHUB_OUTPUT"
# tag potentially newer core image
docker tag synerbi/jupyter:scipy-${{ matrix.type }} ${{ steps.pull.outputs.core_image }}
# make a dummy Dockerfile to use with build-push-action
context=$(mktemp -d)
echo "FROM $image" >> "$context/Dockerfile"
echo "context=$context" >> "$GITHUB_OUTPUT"
- name: test CIL
run: >
docker run --rm -v ./.github/workflows:/gh --user $(id -u) --group-add users
${{ steps.build.outputs.image }} /gh/test_cil.sh
- uses: docker/build-push-action@v5
with:
context: ${{ steps.build.outputs.context }}
push: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- if: github.ref == 'refs/heads/master'
name: push core image
run: docker push ${{ steps.build.outputs.core_image }}
devel:
if: github.event_name == 'schedule' || github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
strategy:
matrix:
type: [gpu, cpu]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha || github.ref }} # fix SHA
- uses: docker/metadata-action@v5
id: meta
with:
images: |
synerbi/sirf
ghcr.io/synerbi/sirf
flavor: |
latest=false
suffix=${{ matrix.type == 'gpu' && 'gpu,onlatest=true' || '' }}
tags: devel
labels: |
org.opencontainers.image.licenses=Apache-2.0${{ matrix.type == 'gpu' && ' AND BSD-3-Clause AND GPL-3.0' || '' }}
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USR }}
password: ${{ secrets.DOCKER_PWD }}
- name: increase disk space
run: ./.github/workflows/GHA_increase_disk_space.sh
- name: cache
uses: actions/cache@v3
with:
key: ccache-docker-${{ matrix.type }}-${{ github.ref_name }}-${{ github.run_id }}
restore-keys: |
ccache-docker-${{ matrix.type }}-${{ github.ref_name }}
ccache-docker-${{ matrix.type }}
ccache-docker
ccache
path: docker/devel/.ccache
- id: pull
name: pull
run: |
suffix=${{ matrix.type == 'gpu' && '-gpu' || '' }}
# pull core image
core_image=ghcr.io/synerbi/sirf:core$suffix
docker pull $core_image || :
# pull sirf image
docker pull ghcr.io/synerbi/sirf:${{ fromJSON(steps.meta.outputs.json).tags[0] }} || :
echo "suffix=$suffix" >> "$GITHUB_OUTPUT"
echo "core_image=$core_image" >> "$GITHUB_OUTPUT"
- id: build
name: build
run: |
# rebuild sirf image
./docker/compose.sh -dbR${{ matrix.type == 'gpu' && 'g' || 'c' }}
image=synerbi/sirf:jupyter${{ steps.pull.outputs.suffix }}
echo "image=$image" >> "$GITHUB_OUTPUT"
- name: test CIL
run: >
docker run --rm -v ./.github/workflows:/gh --user $(id -u) --group-add users
${{ steps.build.outputs.image }} /gh/test_cil.sh
Loading
Loading