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

Upgrade base system to Ubuntu 24.04 #1076

Merged
merged 16 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from 12 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
6 changes: 4 additions & 2 deletions Dockerfile
matentzn marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,11 @@ RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-i
xlsx2csv \
gh \
nodejs \
npm \
graphviz \
python3-psycopg2 \
swi-prolog
swi-prolog \
libpcre3

# Install run-time dependencies for Soufflé.
RUN DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-install-recommends \
Expand Down Expand Up @@ -95,7 +97,7 @@ COPY scripts/obodash /tools
RUN chmod +x /tools/obodash && \
git clone --depth 1 https://github.com/OBOFoundry/OBO-Dashboard.git && \
cd OBO-Dashboard && \
python3 -m pip install -r requirements.txt && \
python3 -m pip install -r requirements.txt --break-system-packages && \
echo " " >> Makefile && \
echo "build/robot.jar:" >> Makefile && \
echo " echo 'skipped ROBOT jar download.....' && touch \$@" >> Makefile && \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ publish-multiarch-dev:
.

constraints.txt: requirements.txt.full
docker run -v $$PWD:/work -w /work --rm -ti obolibrary/odkbuild:latest /work/update-constraints.sh
docker run -v $$PWD:/work -w /work --rm -ti obolibrary/odkbuild:latest /work/update-constraints.sh --install-virtualenv

clean-tests:
rm -rf target/*
Expand Down
3 changes: 0 additions & 3 deletions constraints.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ async-lru==2.0.4
attrs==23.2.0
Babel==2.15.0
babelon==0.2.9
backports.tarfile==1.2.0
bcp47==0.1.0
beautifulsoup4==4.12.3
bidict==0.23.1
Expand Down Expand Up @@ -54,7 +53,6 @@ dosdp==0.1.10.dev1
EditorConfig==0.12.4
et-xmlfile==1.1.0
eutils==0.6.0
exceptiongroup==1.2.1
executing==2.0.1
fastjsonschema==2.20.0
fastobo==0.12.3
Expand Down Expand Up @@ -297,7 +295,6 @@ termcolor==2.4.0
terminado==0.18.1
terminaltables==3.1.10
tinycss2==1.3.0
tomli==2.0.1
tornado==6.4.1
tox==4.16.0
tqdm==4.66.4
Expand Down
7 changes: 4 additions & 3 deletions docker/builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# (typically because pre-compiled binaries don't exist for arm64) and
# we don't want to build directly on the final image (to avoid
# cluttering the image with build-time dependencies).
FROM ubuntu:22.04
FROM ubuntu:24.04
WORKDIR /build

# Software versions
Expand All @@ -27,8 +27,7 @@ RUN apt-get update && \
rustc \
cargo \
python3-dev \
python3-pip \
python3-virtualenv
python3-pip

# Build the Python packages.
# On x86_64, most if not all of these packages should be available as
Expand All @@ -45,6 +44,7 @@ COPY constraints.txt /build/constraints.txt
RUN python3 -m pip install \
-r /build/requirements.txt.lite \
-c /build/constraints.txt \
--no-warn-script-location \
--root /staging/lite
# Then those needed by the odkfull image.
# After installing those packages, we forcibly remove from the odkfull
Expand All @@ -54,6 +54,7 @@ RUN python3 -m pip install \
RUN python3 -m pip install \
-c /build/constraints.txt \
-r /build/requirements.txt \
--no-warn-script-location \
--root /staging/full && \
cd /staging/lite && \
find . -type f | while read f ; do rm -f /staging/full/$f ; done && \
Expand Down
2 changes: 1 addition & 1 deletion docker/odklite/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:24.04
LABEL maintainer="[email protected]"

ENV ROBOT_VERSION=1.9.6
Expand Down
2 changes: 1 addition & 1 deletion docker/robot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:22.04
FROM ubuntu:24.04
LABEL maintainer="[email protected]"

WORKDIR /tools
Expand Down
6 changes: 3 additions & 3 deletions odk/odk.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ class ExecutionContext(JsonSchemaMixin):
project : Optional[OntologyProject] = None
meta : str = ""


@dataclass
class Generator(object):
"""
Expand All @@ -787,7 +787,7 @@ class Generator(object):
"""

## TODO: consider merging Generator and ExecutionContext?
context : ExecutionContext = ExecutionContext()
context : ExecutionContext = field(default_factory=ExecutionContext)

def generate(self, input : str) -> str:
"""
Expand Down Expand Up @@ -1083,7 +1083,7 @@ def seed(config, clean, outdir, templatedir, dependencies, title, user, source,
print(" 5. See the section under '…or push an existing repository from the command line'")
print(" E.g.:")
print("cd {}".format(outdir))
print("git remote add origin git\@github.com:{org}/{repo}.git".format(org=project.github_org, repo=project.repo))
print("git remote add origin [email protected]:{org}/{repo}.git".format(org=project.github_org, repo=project.repo))
print("git branch -M {branch}\n".format(branch=project.git_main_branch))
print("git push -u origin {branch}\n".format(branch=project.git_main_branch))
print("BE BOLD: you can always delete your repo and start again\n")
Expand Down
5 changes: 5 additions & 0 deletions update-constraints.sh
matentzn marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

set -e

if [ "x$1" = x--install-virtualenv ]; then
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python3-virtualenv
fi

virtualenv tmpdir
. tmpdir/bin/activate
python3 -m pip install -U pip
Expand Down
Loading