Skip to content

Commit b5214ca

Browse files
committed
Update CICD Dockefile to use python3.12 and github workflows #2521
1 parent a2884bc commit b5214ca

File tree

3 files changed

+19
-12
lines changed

3 files changed

+19
-12
lines changed

.github/workflows/pytest.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ jobs:
5454
working-directory: ${{ github.workspace }}
5555
# continue-on-error: true
5656
run: |
57-
58-
pip install -r requirements.txt
57+
python -m pip install --upgrade pip
58+
python -m pip install -r requirements.txt
5959
python code/ARAX/ARAXQuery/ARAX_database_manager.py --mnt --skip-if-exists --remove_unused
6060
6161
- name: Stop any running containers

DockerBuild/CICD-Dockerfile

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:20.04
1+
FROM ubuntu:24.04
22

33
# suppress debconf error messages:
44
ARG DEBIAN_FRONTEND=noninteractive
@@ -28,7 +28,7 @@ RUN chmod -R 700 /home/rt/.ssh
2828
# clone RTX repo
2929
RUN mkdir -p /mnt/data/orangeboard/production
3030
RUN chown -R rt.rt /mnt/data/orangeboard/production
31-
RUN su rt && cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git
31+
RUN su - rt -c "cd /mnt/data/orangeboard/production && git clone https://github.com/RTXteam/RTX.git"
3232
RUN chown -R rt.rt /mnt/data/orangeboard/production/RTX
3333

3434
# install apache2 and copy config file
@@ -41,21 +41,28 @@ COPY remoteip.conf /etc/apache2/conf-available/remoteip.conf
4141
RUN a2enconf remoteip
4242
RUN cd /var/www && /usr/sbin/apachectl configtest
4343

44-
# install python and packages
44+
# install python 3.12 and packages
4545
RUN apt-get update
4646
RUN apt-get install -y python3 python3-pip
4747
RUN apt-get install -y software-properties-common
4848
RUN add-apt-repository -y ppa:deadsnakes/ppa
49-
RUN apt-get update && apt-get install -y python3.9 python3.9-dev python3.9-venv
50-
RUN rm /usr/bin/python3 && ln -s /usr/bin/python3.9 /usr/bin/python3
51-
RUN su rt && cd /mnt/data/orangeboard/production/RTX && python3.9 -m pip install click==8.1.3 && python3.9 -m pip install -r requirements.txt && python3.9 -m pip install connexion[swagger-ui]
49+
RUN apt-get update && apt-get install -y python3.12 python3.12-dev python3.12-venv
50+
51+
# make python3 be python 3.12 (used by RTX_OpenAPI.start and various scripts)
52+
RUN rm -f /usr/bin/python3 && ln -s /usr/bin/python3.12 /usr/bin/python3
53+
54+
# install python deps using python 3.12
55+
RUN su - rt -c "cd /mnt/data/orangeboard/production/RTX && python3.12 -m pip install --upgrade pip"
56+
RUN su - rt -c "cd /mnt/data/orangeboard/production/RTX && python3.12 -m pip install click==8.1.3"
57+
RUN su - rt -c "cd /mnt/data/orangeboard/production/RTX && python3.12 -m pip install -r requirements.txt"
58+
RUN su - rt -c "cd /mnt/data/orangeboard/production/RTX && python3.12 -m pip install 'connexion[swagger-ui]'"
5259

5360
# setup services
5461
RUN export DEVAREA=production
5562
RUN cat /mnt/data/orangeboard/production/RTX/code/UI/OpenAPI/python-flask-server/RTX_OpenAPI | sed 's/template/production/g' > /etc/init.d/RTX_OpenAPI_production
5663
RUN chmod 700 /etc/init.d/RTX_OpenAPI_production
57-
RUN su rt && cd /mnt/data/orangeboard/production/RTX/code/UI/OpenAPI/python-flask-server && cp -p RTX_OpenAPI RTX_OpenAPI_production && sed -i 's/template/production/g' RTX_OpenAPI_production
58-
RUN su rt && cd /mnt/data/orangeboard/production/RTX/code/UI/OpenAPI/python-flask-server && cp -p RTX_OpenAPI.start RTX_OpenAPI_production.start && sed -i 's/template/production/g' RTX_OpenAPI_production.start
64+
RUN su - rt -c "cd /mnt/data/orangeboard/production/RTX/code/UI/OpenAPI/python-flask-server && cp -p RTX_OpenAPI RTX_OpenAPI_production && sed -i 's/template/production/g' RTX_OpenAPI_production"
65+
RUN su - rt -c "cd /mnt/data/orangeboard/production/RTX/code/UI/OpenAPI/python-flask-server && cp -p RTX_OpenAPI.start RTX_OpenAPI_production.start && sed -i 's/template/production/g' RTX_OpenAPI_production.start"
5966
RUN update-rc.d RTX_OpenAPI_production defaults
6067

6168
# autocomplete
@@ -65,4 +72,4 @@ RUN cd /mnt/data/orangeboard/production/RTX/code/autocomplete && sed -i 's/devED
6572
RUN update-rc.d RTX_Complete defaults
6673

6774
# setup config.domain
68-
RUN su rt && cd /mnt/data/orangeboard/production/RTX/code/ && echo "Github actions ARAX test suite" > config.domain
75+
RUN su - rt -c "cd /mnt/data/orangeboard/production/RTX/code/ && echo 'Github actions ARAX test suite' > config.domain"

DockerBuild/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FROM ubuntu:24.04
66
ARG DEBIAN_FRONTEND=noninteractive
77

88
# build based on branch
9-
ARG BUILD_BRANCH=issue2521
9+
ARG BUILD_BRANCH=master
1010

1111
# add user "rt" and give sudo privilege:
1212
RUN useradd rt -m -s /bin/bash

0 commit comments

Comments
 (0)