Skip to content

Commit

Permalink
Merge pull request #1164 from mcneilco/ACAS-774
Browse files Browse the repository at this point in the history
ACAS-774: Update Dockerfile to CentOS Stream 9 and Python 3.11
  • Loading branch information
brianbolt authored Jun 6, 2024
2 parents 74549e0 + 47ec53c commit 09178c1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
16 changes: 5 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/centos/centos:stream8
FROM quay.io/centos/centos:stream9

ARG BUILDTIME=1970-01-01T00:00:00Z
ENV ACAS_CLIENT_ABOUT_ACAS_BUILDTIME=${BUILDTIME}
Expand All @@ -9,11 +9,6 @@ ENV ACAS_CLIENT_ABOUT_ACAS_VERSION=${VERSION}
ARG REVISION=UNKNOWN
ENV ACAS_CLIENT_ABOUT_ACAS_REVISION=${REVISION}

# EOL for Centos8-Stream workaround
RUN sed -i 's/^mirrorlist=/#&/' /etc/yum.repos.d/*.repo && \
sed -i 's/^#baseurl=/baseurl=/' /etc/yum.repos.d/*.repo && \
sed -i 's/mirror.centos.org/vault.centos.org/' /etc/yum.repos.d/*.repo

# Update
RUN \
dnf update -y && \
Expand All @@ -26,11 +21,10 @@ RUN \
dnf clean all

#Install python dependencies
RUN dnf install -y python36 python3-pip
RUN alternatives --set python /usr/bin/python3
RUN alternatives --install /usr/bin/pip pip /usr/bin/pip3 1
RUN pip install argparse requests
RUN dnf install -y initscripts python3-psycopg2
RUN dnf install -y python311 python3.11-pip initscripts
RUN alternatives --install /usr/bin/python python /usr/bin/python3.11 1
RUN alternatives --install /usr/bin/pip pip /usr/bin/pip3.11 1
RUN pip install argparse requests psycopg2-binary

# node
ENV NPM_CONFIG_LOGLEVEL warn
Expand Down
13 changes: 10 additions & 3 deletions bin/setenv.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
# Example:
#export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=/usr/lib/jvm/java-1.8.0/jre/lib/amd64:/usr/lib/jvm/java-1.8.0/jre/lib/amd64/server/
PATH=/usr/pgsql-9.4/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ARCH=$(uname -m)

if [ "$ARCH" = "x86_64" ]; then
LD_LIBRARY_PATH=/usr/lib/jvm/java-1.8.0/jre/lib/amd64:/usr/lib/jvm/java-1.8.0/jre/lib/amd64/server/:/R-4.4.0/lib
elif [ "$ARCH" = "aarch64" ]; then
LD_LIBRARY_PATH=/usr/lib/jvm/java-1.8.0/jre/lib/aarch64:/usr/lib/jvm/java-1.8.0/jre/lib/aarch64/server/:/R-4.4.0/lib
fi

export LD_LIBRARY_PATH
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
R_LIBS=/home/runner/build/r_libs
JAVA_HOME=/usr/lib/jvm/java-1.8.0
if [ -e "/opt/rh/rh-python36/enable" ]; then source /opt/rh/rh-python36/enable; fi;
9 changes: 6 additions & 3 deletions modules/GenericDataParser/src/server/generic_data_parser.R
Original file line number Diff line number Diff line change
Expand Up @@ -2018,7 +2018,7 @@ getExperimentByNameCheck <- function(experimentName, protocol, configList, dupli
protocolOfExperiment <- getProtocolByCodeName(experimentList[[1]]$protocol$codeName)


if (is.na(protocol) || protocolOfExperiment$id != protocol$id) {
if (identical(protocol, NA) || protocolOfExperiment$id != protocol$id) {
if (duplicateNamesAllowed) {
experiment <- NA
} else {
Expand Down Expand Up @@ -3580,7 +3580,7 @@ runMain <- function(pathToGenericDataFormatExcelFile, reportFilePath=NULL,
protocol <- NULL
if (!useExisting) {
protocol <- getProtocolByNameAndFormat(protocolName = validatedMetaData[,paste0(racas::applicationSettings$client.protocol.label," Name")][1], configList, inputFormat)
newProtocol <- is.na(protocol[[1]])
newProtocol <- identical(protocol[[1]], NA)
if (!newProtocol) {
validatedMetaData[,paste0(racas::applicationSettings$client.protocol.label," Name")][1] <- getPreferredProtocolName(protocol, validatedMetaData[,paste0(racas::applicationSettings$client.protocol.label," Name")][1])
}
Expand Down Expand Up @@ -3741,7 +3741,7 @@ runMain <- function(pathToGenericDataFormatExcelFile, reportFilePath=NULL,
}

# Checks if we have a new experiment
newExperiment <- class(experiment[[1]])!="list" && is.na(experiment[[1]])
newExperiment <- class(experiment[[1]])!="list" && identical(experiment[[1]], NA)

# If there are errors, do not allow an upload (yes, this is needed a second time)
errorFree <- length(messenger()$errors)==0
Expand Down Expand Up @@ -4641,6 +4641,9 @@ getSubjectAndTreatmentData <- function (precise, genericDataFileDataFrame, calcu
validateSubjectData <- function(subjectData, dryRun) {
# Validates Subject Data
# For now, just passes information to validateValue Kinds
if (is.null(subjectData)) {
return(NULL)
}
uniqueDF <- unique(subjectData[, c("Class", "valueKind")])
uniqueDF <- uniqueDF[!(uniqueDF$valueKind %in% c('flag cause', 'flag observation', 'flag status')), ]
validateValueKinds(uniqueDF$valueKind, uniqueDF$Class, dryRun, reserved = NULL)
Expand Down

0 comments on commit 09178c1

Please sign in to comment.