Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 7069

Postgresql, Postgis, QGIS in container launched from charliecloud

$
0
0

I need to migrate my work for geospatial processing (using mainly qgis processing and postgis functions from python scripts) to a HPC cluster. As neither qgis nor postgis are installed on the HPC I figured I need to setup those two in a container. For building and launching the containers I am limited to charliecloud as docker is not available on the HPC. Regarding containers I am an absolute beginner.

So far I have tried three approaches:

  1. Container from Qgis specific docker image and install Postgis
  2. Container from Postgis specific docker image and install Qgis
  3. Basic Ubuntu container and install Qgis and Postgis

Option 1 and 2 did not work as the very specific docker images are not suited to run other applications. Option 3 works fine for qgis but when I try to install postgis using apt-get install -y postgresql I get the error messages:

debconf: delaying package configuration, since apt-utils is not installeddpkg: error: requested operation requires superuser privilegeE: Sub-process /usr/bin/dpkg returned an error code (2)

running the same command with sudo gives the following messages:

sudo: /etc/sudo.conf is owned by uid 4288686, should be 0sudo: The "no new privileges" flag is set, which prevents sudo from running as root.sudo: If sudo is running in a container, you may need to adjust the container configuration to disable the flag.

I did some research on the "no new privileges" flag but only found solutions for docker, not for charliecloud.

I used a very basic dockerfile for the setup of the ubuntu container as I wanted to do the installations of qgis and postgis myself inside the container to be better able to trace the progress and potential errors.

FROM ubuntu:24.04ENV DEBIAN_FRONTEND=noninteractiveENV LANG=C.UTF-8RUN locale-gen en_US.UTF-8ENV LANG=en_US.UTF-8ENV LANGUAGE=en_US:enENV LC_ALL=en_US.UTF-8RUN mkdir -p /dss /lrz /gpfs

The container was built using ch-image build --force -t image_name -f Dockerfile /path

I have installed postgis and qgis inside the container using

apt-get updateapt-get install -y qgis apt-get update apt-get install -y postgresql 

Another option I was considering is setting up two containers, one specific for qgis and one specific for postgis. After doing some research I could just not figure out how to get one container so access the other using charliecloud. There is a lot of information available on using docker, but I just can't use it.

My prefered option is the setup of qgis and postgis within one container. As I'm a beginner with containers I'm open to any other suggestions and hints aswell.


Viewing all articles
Browse latest Browse all 7069

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>