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: bump base image #1791

Merged
merged 4 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from 3 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
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
run: |
envname="${GITHUB_REPOSITORY##*/}-${GITHUB_RUN_ID}.${GITHUB_RUN_NUMBER}"
echo "envname=$envname" >> $GITHUB_OUTPUT
sed -ri -e 's/^(name: ).*/\1$envname/' -e '/ python=/d' -e 's/(.* numpy=).*/\1${{ matrix.numpy-version }}/' scripts/requirements-test.yml
sed -ri -e 's/^(name: ).*/\1$envname/' -e '/ python /d' -e 's/(.* numpy) .*/\1=${{ matrix.numpy-version }}/' scripts/requirements-test.yml
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:
- uses: actions/checkout@v4
with: {fetch-depth: 0, submodules: recursive}
- name: set requirements
run: sed -ri -e '/ python=/d' -e 's/(.* numpy=).*/\1${{ matrix.numpy-version }}/' -e 's/=cuda*//' -e '/tigre/d' scripts/requirements-test.yml
run: sed -ri -e '/ python /d' -e 's/(.* numpy) .*/\1=${{ matrix.numpy-version }}/' -e 's/=cuda*//' -e '/tigre/d' scripts/requirements-test.yml
- uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
Expand Down
8 changes: 3 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
# - https://github.com/jupyter/docker-stacks
# - https://github.com/TomographicImaging/CIL#installation-of-cil
# consumers:
# - https://github.com/stfc/cloud-docker-images
# TODO: use `ubuntu-22.04` after `python=3.11` is supported, vis.
# https://github.com/TomographicImaging/CIL/issues/1490
FROM jupyter/tensorflow-notebook:ubuntu-20.04
# - harbor.stfc.ac.uk/imaging-tomography/cil
FROM jupyter/tensorflow-notebook:ubuntu-22.04
LABEL org.opencontainers.image.source=https://github.com/TomographicImaging/CIL
# tigre: BSD-3-Clause, astra-toolbox: GPL-3.0
LABEL org.opencontainers.image.licenses="Apache-2.0 AND BSD-3-Clause AND GPL-3.0"
Expand All @@ -17,7 +15,7 @@ ARG CIL_EXTRA_PACKAGES="tigre=2.6 astra-toolbox=2.1.0=cuda*"
# vis. https://github.com/TomographicImaging/CIL/pull/1590
COPY --chown="${NB_USER}" scripts/requirements-test.yml environment.yml
# channel_priority: https://stackoverflow.com/q/58555389
RUN sed -ri '/tigre|astra-toolbox/d' environment.yml \
RUN sed -ri '/tigre|astra-toolbox| python /d' environment.yml \
&& for pkg in 'jupyter-server-proxy>4.1.0' $CIL_EXTRA_PACKAGES; do echo " - $pkg" >> environment.yml; done \
&& conda config --env --set channel_priority strict \
&& for ch in defaults nvidia ccpi intel conda-forge; do conda config --env --add channels $ch; done \
Expand Down
Empty file modified recipe/build.sh
100644 → 100755
Empty file.
Empty file modified scripts/create_local_env_for_cil_development.sh
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions scripts/requirements-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ channels:
- defaults
dependencies:
# base (vis. recipe/conda_build_config.yaml)
- python=3.10
- numpy=1.24
- python >=3.10
- numpy >=1.23
Comment on lines +21 to +22
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or potentially

Suggested change
- python >=3.10
- numpy >=1.23
- python >=3.10,<3.13
- numpy >=1.23,<1.27

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not every combination within there though hopefully conda can figure that out in practise. Can a user specify the python version on the command line or would that need a python = x.x?

- ccpi::cil-data
- ccpi::tigre=2.6
- ccpi::ccpi-regulariser=24.0.0
Expand Down
Loading