-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathContainerfile_base
50 lines (38 loc) · 2 KB
/
Containerfile_base
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
FROM registry.access.redhat.com/ubi9/ubi-minimal:latest
# FROM python:3.11.7
# setup
LABEL "name"="tensorlakehouse_openeo_driver_base"
LABEL "vendor"="IBM"
LABEL "summary"="Backend implementation of openEO API"
# https://distributed.dask.org/en/latest/worker-memory.html#automatically-trim-memory
ENV MALLOC_TRIM_THRESHOLD_=0
# set path to openeo-geodn-driver
ENV TENSORLAKEHOUSE_OPENEO_DRIVER_DIR=/opt/app-root/src/tensorlakehouse-openeo-driver
# path to openeo-geodn-driver data
ENV TENSORLAKEHOUSE_OPENEO_DRIVER_DATA_DIR=${TENSORLAKEHOUSE_OPENEO_DRIVER_DIR}/data
# set path to dataservice-sdk
ENV DATASERVICE_PATH=${TENSORLAKEHOUSE_OPENEO_DRIVER_DIR}/libs/dataservice_sdk/src
# set pythonpath that includes dataservice_sdk
ENV PYTHONPATH=${TENSORLAKEHOUSE_OPENEO_DRIVER_DIR}:${DATASERVICE_PATH}
RUN mkdir -p ${TENSORLAKEHOUSE_OPENEO_DRIVER_DATA_DIR}
USER root
# based on https://stackoverflow.com/questions/58473832/how-do-i-change-the-permissions-in-openshift-container-platform/58474145#58474145
RUN chgrp -R 0 ${TENSORLAKEHOUSE_OPENEO_DRIVER_DATA_DIR} && \
chmod -R g=u ${TENSORLAKEHOUSE_OPENEO_DRIVER_DATA_DIR}
WORKDIR ${TENSORLAKEHOUSE_OPENEO_DRIVER_DIR}
RUN microdnf update -y && microdnf upgrade -y
# RUN microdnf group install "Development Tools"
RUN microdnf install make automake gcc gcc-c++ wget zlib-devel openssl-devel openssl git postgresql-devel libffi-devel bzip2-devel tar findutils sqlite-devel -y
RUN wget https://www.python.org/ftp/python/3.11.7/Python-3.11.7.tgz && tar -xzvf Python-3.11.7.tgz
# RUN cd Python-3.11.7
WORKDIR ${TENSORLAKEHOUSE_OPENEO_DRIVER_DIR}/Python-3.11.7
#Prepare compilation
RUN ./configure --enable-optimizations --enable-loadable-sqlite-extensions && make && make install
WORKDIR ${TENSORLAKEHOUSE_OPENEO_DRIVER_DIR}
RUN python3 -m pip install -U pip
# install requirements
COPY requirements.txt .
# COPY dev_requirements.txt .
RUN python3 -m pip install --no-cache-dir -r requirements.txt
COPY dev_requirements.txt .
RUN python3 -m pip install --no-cache-dir -r dev_requirements.txt