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

[cicd] Upgrade out of centos7 for cuesubmit and cuegui #1620

Merged
Show file tree
Hide file tree
Changes from all 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
34 changes: 10 additions & 24 deletions cuegui/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
FROM --platform=linux/x86_64 centos:7
FROM --platform=linux/x86_64 rockylinux:9.3

WORKDIR /src

# centos:7 repos moved to vault.centos
RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/CentOS-*.repo
RUN sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/CentOS-*.repo
RUN sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/CentOS-*.repo

RUN yum -y install \
epel-release \
fontconfig \
Expand All @@ -25,20 +20,13 @@ RUN yum -y install \
xcb-util-wm.x86_64

RUN yum -y install \
python36 \
python36-devel \
python36-pip

RUN python3.6 -m pip install --upgrade pip
RUN python3.6 -m pip install --upgrade setuptools

RUN dbus-uuidgen > /etc/machine-id
python\
python-pip

COPY LICENSE ./
COPY requirements.txt ./
COPY requirements_gui.txt ./
RUN python -m pip install --upgrade pip

RUN python3.6 -m pip install -r requirements.txt -r requirements_gui.txt
COPY LICENSE requirements.txt requirements_gui.txt ./
RUN python -m pip install -r requirements.txt -r requirements_gui.txt

COPY proto/ ./proto
COPY pycue/README.md ./pycue/
Expand All @@ -47,15 +35,15 @@ COPY pycue/FileSequence ./pycue/FileSequence
COPY pycue/opencue ./pycue/opencue
COPY ci/fix_compiled_proto.py .

RUN python3.6 -m grpc_tools.protoc \
RUN python -m grpc_tools.protoc \
-I=./proto \
--python_out=./pycue/opencue/compiled_proto \
--grpc_python_out=./pycue/opencue/compiled_proto \
./proto/*.proto

# Fix imports to work in both Python 2 and 3. See
# <https://github.com/protocolbuffers/protobuf/issues/1491> for more info.
RUN python3 ./fix_compiled_proto.py pycue/opencue/compiled_proto
RUN python ./fix_compiled_proto.py pycue/opencue/compiled_proto

COPY cuegui/README.md ./cuegui/
COPY cuegui/setup.py ./cuegui/
Expand All @@ -65,10 +53,8 @@ COPY cuegui/cuegui ./cuegui/cuegui
COPY VERSION.in VERSIO[N] ./
RUN test -e VERSION || echo "$(cat VERSION.in)" | tee VERSION

RUN cd pycue && python3.6 setup.py install

RUN cd cuegui && xvfb-run -d python3.6 setup.py test

RUN cd pycue && python setup.py install
RUN cd cuegui && xvfb-run -d python setup.py test
RUN cp LICENSE requirements.txt requirements_gui.txt VERSION cuegui/

RUN versioned_name="cuegui-$(cat ./VERSION)-all" \
Expand Down
27 changes: 10 additions & 17 deletions cuesubmit/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
FROM --platform=linux/x86_64 centos:7
FROM --platform=linux/x86_64 rockylinux:9.3

WORKDIR /src

# centos:7 repos moved to vault.centos
RUN sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/CentOS-*.repo
RUN sed -i s/^#.*baseurl=http/baseurl=http/g /etc/yum.repos.d/CentOS-*.repo
RUN sed -i s/^mirrorlist=http/#mirrorlist=http/g /etc/yum.repos.d/CentOS-*.repo

RUN yum -y install \
epel-release \
gcc \
mesa-libGL \
python-devel

RUN yum -y install \
python36 \
python36-devel \
python36-pip
python \
python-pip

RUN python3.6 -m pip install --upgrade pip
RUN python3.6 -m pip install --upgrade setuptools
RUN python -m pip install --upgrade pip

COPY LICENSE ./
COPY requirements.txt ./
COPY requirements_gui.txt ./

RUN python3.6 -m pip install -r requirements.txt -r requirements_gui.txt
RUN python -m pip install -r requirements.txt -r requirements_gui.txt

COPY proto/ ./proto
COPY pycue/README.md ./pycue/
Expand All @@ -34,15 +27,15 @@ COPY pycue/opencue ./pycue/opencue
COPY pycue/FileSequence ./pycue/FileSequence
COPY ci/fix_compiled_proto.py .

RUN python3.6 -m grpc_tools.protoc \
RUN python -m grpc_tools.protoc \
-I=./proto \
--python_out=./pycue/opencue/compiled_proto \
--grpc_python_out=./pycue/opencue/compiled_proto \
./proto/*.proto

# Fix imports to work in both Python 2 and 3. See
# <https://github.com/protocolbuffers/protobuf/issues/1491> for more info.
RUN python3 ./fix_compiled_proto.py pycue/opencue/compiled_proto
RUN python ./fix_compiled_proto.py pycue/opencue/compiled_proto

COPY pyoutline/README.md ./pyoutline/
COPY pyoutline/setup.py ./pyoutline/
Expand All @@ -59,9 +52,9 @@ COPY cuesubmit/cuesubmit ./cuesubmit/cuesubmit
COPY VERSION.in VERSIO[N] ./
RUN test -e VERSION || echo "$(cat VERSION.in)" | tee VERSION

RUN cd pycue && python3.6 setup.py install
RUN cd pyoutline && python3.6 setup.py install
RUN cd cuesubmit && python3.6 setup.py test
RUN cd pycue && python setup.py install
RUN cd pyoutline && python setup.py install
RUN cd cuesubmit && python setup.py test

RUN cp LICENSE requirements.txt requirements_gui.txt VERSION cuesubmit/

Expand Down