willing to package apache-drill in singularity conatiner

9 views
Skip to first unread message

Shamim Hussain

unread,
Sep 30, 2021, 8:03:27 AM9/30/21
to singularity
I am trying to embed Apache drill in singularity container ,already did build but I am trying to exec via singularity shell to start Apache drill ,it gives me a error

This is twhat I received as error
my def file content is here


BootStrap: docker
From: ubuntu:xenial


%runscript

 #cat username.csv | sed -e 's/,,/, ,/g' | column -s, -t | less -#5 -N -S

   echo "This is basically content of csv file stored on our host system"
%post

    apt-get -y update
  apt-get install bsdmainutils
    apt-get install -y less
    apt-get install -y wget vim
    apt-get install coreutils
  mkdir apache-drill
cd /home/apche-drill
apt-get install -y tar
tar -xvzf apache-drill-1.19.0.tar.gz
cd apache-drill-1.19.0
apt-get install -y openjdk-8-jdk
apt-get -y install sudo
chmod 777 -R log
sudo bin/drill-embedded

%files
# Files to copy from the host sy

%environment
     export PATH=/usr/games:$PATH
     export LC_ALL=C


This is twhat I received as error

Log directory does not exist or is not writeable


i am new to singularity need help from seniors
error.jpg

Jason Stover

unread,
Sep 30, 2021, 8:39:00 AM9/30/21
to singu...@lbl.gov
Try changing this:

> mkdir apache-drill

to

> mkdir /home/apache-drill

-J
> --
> You received this message because you are subscribed to the Google Groups "singularity" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.
> To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/singularity/cd2d9971-649b-4dfc-9695-e3cf8c8ada5fn%40lbl.gov.

Jason Stover

unread,
Sep 30, 2021, 8:44:05 AM9/30/21
to singu...@lbl.gov
Sorry, I didn't get the full thing in my head till after I drank more
coffee. The image is *not* writable (squashfs). What you'll need to do
is bind mount in an external directory... So something like:

(on host)
mkdir ~/drill_logs
singularity -B ~/drill_logs:/home/apache-drill/apache-drill-1.19.0/log drill.img

-J

Shamim Hussain

unread,
Sep 30, 2021, 8:51:41 AM9/30/21
to singu...@lbl.gov
thanks alot while executing second command on hots i got this error as attached in screenshot

error 2.jpg

Shamim Hussain

unread,
Sep 30, 2021, 8:51:57 AM9/30/21
to singu...@lbl.gov

Jason Stover

unread,
Sep 30, 2021, 8:58:00 AM9/30/21
to singu...@lbl.gov
Yeah, my command line given was totally not correct for what you need.
The `-B` option given is what you need to bind mount a directory as
the "log" directory. You seem to have the image named as:
"lolcow.sif"

So, for your "run", "shell", whatever command.... just add in the -B
option to that.

-J

On Thu, Sep 30, 2021 at 7:51 AM Shamim Hussain
> To view this discussion on the web visit https://groups.google.com/a/lbl.gov/d/msgid/singularity/CAAcxcVKds%2BWDmhEpdWoSTvgWyk_eEr8OvxQOjufpwyoAVobuRw%40mail.gmail.com.

Shamim Hussain

unread,
Sep 30, 2021, 10:16:59 AM9/30/21
to singu...@lbl.gov
Thanks alot Dear Jason you have solved my problem ,I was struggling for couple of hours
Stay blessed

Reply all
Reply to author
Forward
0 new messages