Skip to content

Commit

Permalink
Bexhoma: Alpine and Python 3.12.8 as basis for dbmsbenchmarker
Browse files Browse the repository at this point in the history
  • Loading branch information
perdelt committed Dec 13, 2024
1 parent 0627175 commit 4274285
Show file tree
Hide file tree
Showing 4 changed files with 137 additions and 58 deletions.
94 changes: 67 additions & 27 deletions images/benchmarker_dbmsbenchmarker/Dockerfile_template
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
FROM python:3.12.5

# does not compile numpy correctly
# FROM python:3.13-rc-slim
#FROM python:3.12.5
FROM alpine:3.15

WORKDIR /usr/src/app

Expand All @@ -13,33 +11,80 @@ ENV DBMSBENCHMARKER_NOW 0
ENV DBMSBENCHMARKER_START 0
ENV DBMSBENCHMARKER_SHUFFLE_QUERIES False

RUN apt update
RUN apt install default-jre -y
# does not compile numpy correctly
# FROM python:3.13-rc-slim

# only needed in slim releases
# RUN apt install git -y
# RUN apt install build-essential -y
# Set environment variables for Python installation
ENV PYTHON_VERSION=3.12.8
ENV PYTHON_SRC=https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz

# Install necessary packages
RUN apk add --no-cache \
build-base \
linux-headers \
libffi-dev \
openssl-dev \
zlib-dev \
bzip2-dev \
xz-dev \
readline-dev \
sqlite-dev \
ncurses-dev \
util-linux-dev \
libressl-dev \
tar \
curl

# Download, extract, and compile Python
RUN curl -fSL $PYTHON_SRC -o /tmp/Python.tgz && \
tar -xzf /tmp/Python.tgz -C /tmp && \
cd /tmp/Python-$PYTHON_VERSION && \
./configure --enable-optimizations && \
make && \
make install && \
rm -rf /tmp/Python.tgz /tmp/Python-$PYTHON_VERSION

# Verify Python installation
RUN python3.12 --version && pip3 --version

# Set default python and pip to Python 3.12
RUN ln -sf /usr/local/bin/python3.12 /usr/local/bin/python && \
ln -sf /usr/local/bin/pip3 /usr/local/bin/pip

RUN pip uninstall dbmsbenchmarker -y
RUN JAVA_HOME=/usr/lib/jvm/java-1.8.0/ pip install --no-cache-dir --upgrade --force-reinstall git+https://github.com/Beuth-Erdelt/DBMS-Benchmarker@{version}
WORKDIR /usr/src/app

# we only need packages required by dbmsbenchmarker
#COPY requirements.txt ./
#RUN pip install --no-cache-dir -r requirements.txt
# Update package index and install necessary packages
RUN apk update && apk add --no-cache \
openjdk17-jre \
zip \
nano

RUN git clone https://github.com/Beuth-Erdelt/DBMS-Benchmarker --branch {version}
RUN mkdir /results

WORKDIR /usr/src/app/DBMS-Benchmarker
RUN apk add --no-cache bash

SHELL ["/bin/bash", "-c"]

# RUN git pull
ENV VIRTUAL_ENV=/opt/venv

#COPY . .
# CMD sleep3600

RUN apt install nano -y
RUN python -m pip install virtualenv
RUN python -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN apk add --no-cache git
RUN JAVA_HOME=/usr/lib/jvm/java-1.8.0/ pip install --no-cache-dir --upgrade --force-reinstall git+https://github.com/Beuth-Erdelt/DBMS-Benchmarker@{version}

RUN mkdir -p /results
RUN mkdir -p /results/$DBMSBENCHMARKER_CODE
WORKDIR /usr/src/app/DBMS-Benchmarker

ENV DBMSBENCHMARKER_SLEEP 30
ENV DBMSBENCHMARKER_RECREATE_PARAMETER 0
ENV DBMSBENCHMARKER_VERBOSE 0
ENV DBMSBENCHMARKER_DEV 0
ENV DBMSBENCHMARKER_NOW 0
ENV DBMSBENCHMARKER_START 0
ENV DBMSBENCHMARKER_SHUFFLE_QUERIES False

RUN mkdir -p jars/

Expand All @@ -57,15 +102,9 @@ RUN wget https://dlm.mariadb.com/2678616/Connectors/java/connector-java-3.1.0/ma
RUN cp mariadb-java-client-3.1.0.jar jars/mariadb-java-client-3.1.0.jar

######### Specific version of MonetDB JDBC #########
#RUN wget https://www.monetdb.org/downloads/Java/archive/monetdb-jdbc-3.2.jre8.jar --no-check-certificate
#RUN cp monetdb-jdbc-3.2.jre8.jar jars/monetdb-jdbc-3.2.jre8.jar
RUN wget https://www.monetdb.org/downloads/Java/archive/monetdb-jdbc-3.3.jre8.jar --no-check-certificate
RUN cp monetdb-jdbc-3.3.jre8.jar jars/monetdb-jdbc-3.3.jre8.jar

######### Specific version of MonetDB JDBC #########
RUN wget https://www.monetdb.org/downloads/Java/monetdb-jdbc-3.3.jre8.jar --no-check-certificate
RUN cp monetdb-jdbc-3.3.jre8.jar jars/monetdb-jdbc-3.3.jre8.jar

######### Specific version of SingleStore JDBC #########
RUN wget https://github.com/memsql/S2-JDBC-Connector/releases/download/v1.1.4/singlestore-jdbc-client-1.1.4.jar
RUN cp singlestore-jdbc-client-1.1.4.jar jars/singlestore-jdbc-client-1.1.4.jar
Expand All @@ -82,6 +121,7 @@ RUN cp jdbc-yugabytedb-42.3.5-yb-2.jar jars/jdbc-yugabytedb-42.3.5-yb-2.jar


######### Redis Client - Download and compile #########
RUN apk add --no-cache make cmake gcc libc-dev
RUN cd /tmp; wget http://download.redis.io/redis-stable.tar.gz; tar xvzf redis-stable.tar.gz; cd redis-stable; make; cp src/redis-cli /usr/local/bin/; chmod 755 /usr/local/bin/redis-cli


Expand Down
94 changes: 67 additions & 27 deletions images/benchmarker_dbmsbenchmarker/Dockerfile_v0.14.6
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
FROM python:3.12.5

# does not compile numpy correctly
# FROM python:3.13-rc-slim
#FROM python:3.12.5
FROM alpine:3.15

WORKDIR /usr/src/app

Expand All @@ -13,33 +11,80 @@ ENV DBMSBENCHMARKER_NOW 0
ENV DBMSBENCHMARKER_START 0
ENV DBMSBENCHMARKER_SHUFFLE_QUERIES False

RUN apt update
RUN apt install default-jre -y
# does not compile numpy correctly
# FROM python:3.13-rc-slim

# only needed in slim releases
# RUN apt install git -y
# RUN apt install build-essential -y
# Set environment variables for Python installation
ENV PYTHON_VERSION=3.12.8
ENV PYTHON_SRC=https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz

# Install necessary packages
RUN apk add --no-cache \
build-base \
linux-headers \
libffi-dev \
openssl-dev \
zlib-dev \
bzip2-dev \
xz-dev \
readline-dev \
sqlite-dev \
ncurses-dev \
util-linux-dev \
libressl-dev \
tar \
curl

# Download, extract, and compile Python
RUN curl -fSL $PYTHON_SRC -o /tmp/Python.tgz && \
tar -xzf /tmp/Python.tgz -C /tmp && \
cd /tmp/Python-$PYTHON_VERSION && \
./configure --enable-optimizations && \
make && \
make install && \
rm -rf /tmp/Python.tgz /tmp/Python-$PYTHON_VERSION

# Verify Python installation
RUN python3.12 --version && pip3 --version

# Set default python and pip to Python 3.12
RUN ln -sf /usr/local/bin/python3.12 /usr/local/bin/python && \
ln -sf /usr/local/bin/pip3 /usr/local/bin/pip

RUN pip uninstall dbmsbenchmarker -y
RUN JAVA_HOME=/usr/lib/jvm/java-1.8.0/ pip install --no-cache-dir --upgrade --force-reinstall git+https://github.com/Beuth-Erdelt/[email protected]
WORKDIR /usr/src/app

# we only need packages required by dbmsbenchmarker
#COPY requirements.txt ./
#RUN pip install --no-cache-dir -r requirements.txt
# Update package index and install necessary packages
RUN apk update && apk add --no-cache \
openjdk17-jre \
zip \
nano

RUN git clone https://github.com/Beuth-Erdelt/DBMS-Benchmarker --branch v0.14.6
RUN mkdir /results

WORKDIR /usr/src/app/DBMS-Benchmarker
RUN apk add --no-cache bash

SHELL ["/bin/bash", "-c"]

# RUN git pull
ENV VIRTUAL_ENV=/opt/venv

#COPY . .
# CMD sleep3600

RUN apt install nano -y
RUN python -m pip install virtualenv
RUN python -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN apk add --no-cache git
RUN JAVA_HOME=/usr/lib/jvm/java-1.8.0/ pip install --no-cache-dir --upgrade --force-reinstall git+https://github.com/Beuth-Erdelt/[email protected]

RUN mkdir -p /results
RUN mkdir -p /results/$DBMSBENCHMARKER_CODE
WORKDIR /usr/src/app/DBMS-Benchmarker

ENV DBMSBENCHMARKER_SLEEP 30
ENV DBMSBENCHMARKER_RECREATE_PARAMETER 0
ENV DBMSBENCHMARKER_VERBOSE 0
ENV DBMSBENCHMARKER_DEV 0
ENV DBMSBENCHMARKER_NOW 0
ENV DBMSBENCHMARKER_START 0
ENV DBMSBENCHMARKER_SHUFFLE_QUERIES False

RUN mkdir -p jars/

Expand All @@ -57,15 +102,9 @@ RUN wget https://dlm.mariadb.com/2678616/Connectors/java/connector-java-3.1.0/ma
RUN cp mariadb-java-client-3.1.0.jar jars/mariadb-java-client-3.1.0.jar

######### Specific version of MonetDB JDBC #########
#RUN wget https://www.monetdb.org/downloads/Java/archive/monetdb-jdbc-3.2.jre8.jar --no-check-certificate
#RUN cp monetdb-jdbc-3.2.jre8.jar jars/monetdb-jdbc-3.2.jre8.jar
RUN wget https://www.monetdb.org/downloads/Java/archive/monetdb-jdbc-3.3.jre8.jar --no-check-certificate
RUN cp monetdb-jdbc-3.3.jre8.jar jars/monetdb-jdbc-3.3.jre8.jar

######### Specific version of MonetDB JDBC #########
RUN wget https://www.monetdb.org/downloads/Java/monetdb-jdbc-3.3.jre8.jar --no-check-certificate
RUN cp monetdb-jdbc-3.3.jre8.jar jars/monetdb-jdbc-3.3.jre8.jar

######### Specific version of SingleStore JDBC #########
RUN wget https://github.com/memsql/S2-JDBC-Connector/releases/download/v1.1.4/singlestore-jdbc-client-1.1.4.jar
RUN cp singlestore-jdbc-client-1.1.4.jar jars/singlestore-jdbc-client-1.1.4.jar
Expand All @@ -82,6 +121,7 @@ RUN cp jdbc-yugabytedb-42.3.5-yb-2.jar jars/jdbc-yugabytedb-42.3.5-yb-2.jar


######### Redis Client - Download and compile #########
RUN apk add --no-cache make cmake gcc libc-dev
RUN cd /tmp; wget http://download.redis.io/redis-stable.tar.gz; tar xvzf redis-stable.tar.gz; cd redis-stable; make; cp src/redis-cli /usr/local/bin/; chmod 755 /usr/local/bin/redis-cli


Expand Down
2 changes: 1 addition & 1 deletion images/evaluator_dbmsbenchmarker/Dockerfile_template
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM alpine:3.15
# FROM python:3.13-rc-slim

# Set environment variables for Python installation
ENV PYTHON_VERSION=3.12.5
ENV PYTHON_VERSION=3.12.8
ENV PYTHON_SRC=https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz

# Install necessary packages
Expand Down
5 changes: 2 additions & 3 deletions images/evaluator_dbmsbenchmarker/Dockerfile_v0.14.6
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ FROM alpine:3.15
# FROM python:3.13-rc-slim

# Set environment variables for Python installation
ENV PYTHON_VERSION=3.12.5
ENV PYTHON_VERSION=3.12.8
ENV PYTHON_SRC=https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tgz

# Install necessary packages
Expand Down Expand Up @@ -57,8 +57,6 @@ RUN mkdir /results

RUN apk add --no-cache bash

RUN apk add --no-cache git

SHELL ["/bin/bash", "-c"]

ENV VIRTUAL_ENV=/opt/venv
Expand All @@ -69,6 +67,7 @@ RUN python -m pip install virtualenv
RUN python -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN apk add --no-cache git
RUN JAVA_HOME=/usr/lib/jvm/java-1.8.0/ pip install --no-cache-dir --upgrade --force-reinstall git+https://github.com/Beuth-Erdelt/[email protected]

RUN pip install jupyter
Expand Down

0 comments on commit 4274285

Please sign in to comment.