Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No Java Runtime Environment(JRE) was found on this system. #290

Closed
mianasbat opened this issue Jul 29, 2019 · 18 comments · Fixed by #299
Closed

No Java Runtime Environment(JRE) was found on this system. #290

mianasbat opened this issue Jul 29, 2019 · 18 comments · Fixed by #299

Comments

@mianasbat
Copy link

mianasbat commented Jul 29, 2019

Hi,
I followed the following steps on centos 7 and end up in "No Java Runtime Environment (JRE) was found on this system".
Here are the steps:

sudo yum update && sudo yum install -y build-essential libssl-dev uuid-dev libgpgme11-dev squashfs-tools libseccomp-dev wget pkg-config git


wget https://dl.google.com/go/go1.12.7.linux-amd64.tar.gz

tar -C /usr/local -zxvf go1.12.7.linux-amd64.tar.gz

export PATH=$PATH:/usr/local/go/bin

source ~/.bashrc

git clone https://github.com/sylabs/singularity.git

cd singularity

yum install openssl-devel -y

yum install libuuid-devel -y

./mconfig
cd /root/singularity/builddir
make
make install

export PATH=$PATH:/root/singularity/builddir
export PATH=$PATH:/usr/local/bin

source ~/.bashrc

singularity help

cd
wget https://github.com/kaczmarj/neurodocker/files/3462171/singularity_recipe_neuro.txt
singularity build neurosing.sif singularity_recipe_neuro.txt

Here is the error

Screenshot 2019-07-29 at 22 46 59

@kaczmarj
Copy link
Collaborator

kaczmarj commented Aug 2, 2019

hi @mianasbat - thanks for the report. can you please give the command you used to create the file singularity_recipe_neuro.txt? thanks.

@mianasbat
Copy link
Author

Hi Kaczmarj, Thanks for reply. Attached is the recipe.txt. #
singularity_recipe_neuro.txt

@kaczmarj
Copy link
Collaborator

hi @mianasbat - i was able to reproduce your issue. are you attached to ubuntu:latest as a base image? switching debian:stretch works.

@mianasbat
Copy link
Author

@kaczmarg, I will give it a try and let you know. Many thanks.

@mianasbat
Copy link
Author

@kaczmarj I tried it today in new centos vm in virtualbox. Running it with sudo switching to debian:stretch image I got some permission errors. The final part of terminal log is attached.

termianllog.txt

@kaczmarj
Copy link
Collaborator

kaczmarj commented Sep 5, 2019 via email

@mianasbat
Copy link
Author

mianasbat commented Sep 5, 2019

@kaczmarj thanks for reply. Not sure about neurodocker ?
I just ran as root

singularity build neurosing.sif singularity_recipe_neuro.txt

I also did

singularity build neurosing.sif singularity_recipe_neuro.txt> run_log.txt

run_log1.txt

@kaczmarj
Copy link
Collaborator

@mianasbat - can you please try again with the latest neurodocker container? kaczmarj/neurodocker:master

@kaczmarj kaczmarj reopened this Sep 18, 2019
@mianasbat
Copy link
Author

@kaczmarj - for the above image I got the error

[root@localhost ~]# singularity build neurosing.sif singularity_recipe_neuro.txt
INFO:    Starting build...
Getting image source signatures
Skipping fetch of repeat blob sha256:5d20c808ce198565ff70b3ed23a991dd49afac45dece63474b27ce6ed036adc6
Skipping fetch of repeat blob sha256:2525790be8a30b7ba1055f21c57a2acc666a930d7450fbc07295e4c51b392474
Skipping fetch of repeat blob sha256:cfebb70eb20ab32386beb1a013404b3872b9403702c8da348abbe9d00571322d
Skipping fetch of repeat blob sha256:92cd4890849ca69a3f6ad4891a0dc7bbc974d24a105bb9570a1692459cde5a9c
Copying config sha256:421136a398dcb5cd17ade3d4de7b6f4f7155cf985985cab2cb85f7c07a699d66
 1.88 KiB / 1.88 KiB [======================================================] 0s
Writing manifest to image destination
Storing signatures
2019/09/19 13:07:17  info unpack layer: sha256:5d20c808ce198565ff70b3ed23a991dd49afac45dece63474b27ce6ed036adc6
2019/09/19 13:07:17  info unpack layer: sha256:2525790be8a30b7ba1055f21c57a2acc666a930d7450fbc07295e4c51b392474
2019/09/19 13:07:20  info unpack layer: sha256:cfebb70eb20ab32386beb1a013404b3872b9403702c8da348abbe9d00571322d
2019/09/19 13:07:21  info unpack layer: sha256:92cd4890849ca69a3f6ad4891a0dc7bbc974d24a105bb9570a1692459cde5a9c
INFO:    Running post scriptlet
+ export ND_ENTRYPOINT=/neurodocker/startup.sh
+ apt-get update -qq
/bin/sh: apt-get: not found
FATAL:   failed to execute %post proc: exit status 127
FATAL:   While performing build: while running engine: exit status 255

The image is centos I believe and it is expecting Ubuntu may be?

@kaczmarj
Copy link
Collaborator

yes looks like you are using centos but requesting the apt-get package manager, which is only for debian/ubuntu images.

can you build the image using debian:stretch as a base image and apt as package manager?

@kaczmarj
Copy link
Collaborator

hi @mianasbat - the command below should work for you. i know your original dockerfile installs more than spm12, but this should demonstrate how spm12 can be successfully installed.

docker run --rm kaczmarj/neurodocker:master generate docker --base=debian:jessie --pkg-manager=apt --spm version=r7219

@mianasbat
Copy link
Author

@kaczmarj
It spit the following text. Also it is not addressing the issue with the recipe.

docker run --rm kaczmarj/neurodocker:master generate docker --base=debian:jessie --pkg-manager=apt --spm version=r7219

Unable to find image 'kaczmarj/neurodocker:master' locally
master: Pulling from kaczmarj/neurodocker
5d20c808ce19: Pull complete 
2525790be8a3: Pull complete 
800717a55ae4: Pull complete 
8494bd0b800b: Pull complete 
Digest: sha256:75ebbd7a6b8c46de1913c71cc5dfbb5d0a5b33822c4152e0e509c1e530d42e8c
Status: Downloaded newer image for kaczmarj/neurodocker:master
# Your version: 0.5.0-9-gaaa7671 Latest version: 0.5.0
# Generated by Neurodocker version 0.5.0-9-gaaa7671
# Timestamp: 2019-10-03 13:00:12 UTC
# 
# Thank you for using Neurodocker. If you discover any issues
# or ways to improve this software, please submit an issue or
# pull request on our GitHub repository:
# 
#     https://github.com/kaczmarj/neurodocker

FROM debian:jessie

ARG DEBIAN_FRONTEND="noninteractive"

ENV LANG="en_US.UTF-8" \
    LC_ALL="en_US.UTF-8" \
    ND_ENTRYPOINT="/neurodocker/startup.sh"
RUN export ND_ENTRYPOINT="/neurodocker/startup.sh" \
    && apt-get update -qq \
    && apt-get install -y -q --no-install-recommends \
           apt-utils \
           bzip2 \
           ca-certificates \
           curl \
           locales \
           unzip \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/* \
    && sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
    && dpkg-reconfigure --frontend=noninteractive locales \
    && update-locale LANG="en_US.UTF-8" \
    && chmod 777 /opt && chmod a+s /opt \
    && mkdir -p /neurodocker \
    && if [ ! -f "$ND_ENTRYPOINT" ]; then \
         echo '#!/usr/bin/env bash' >> "$ND_ENTRYPOINT" \
    &&   echo 'set -e' >> "$ND_ENTRYPOINT" \
    &&   echo 'export USER="${USER:=`whoami`}"' >> "$ND_ENTRYPOINT" \
    &&   echo 'if [ -n "$1" ]; then "$@"; else /usr/bin/env bash; fi' >> "$ND_ENTRYPOINT"; \
    fi \
    && chmod -R 777 /neurodocker && chmod a+s /neurodocker

ENTRYPOINT ["/neurodocker/startup.sh"]

ENV FORCE_SPMMCR="1" \
    LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu:/opt/matlabmcr-2010a/v713/runtime/glnxa64:/opt/matlabmcr-2010a/v713/bin/glnxa64:/opt/matlabmcr-2010a/v713/sys/os/glnxa64:/opt/matlabmcr-2010a/v713/extern/bin/glnxa64" \
    MATLABCMD="/opt/matlabmcr-2010a/v713/toolbox/matlab"
RUN export TMPDIR="$(mktemp -d)" \
    && apt-get update -qq \
    && apt-get install -y -q --no-install-recommends \
           bc \
           libncurses5 \
           libxext6 \
           libxmu6 \
           libxpm-dev \
           libxt6 \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/* \
    && echo "Downloading MATLAB Compiler Runtime ..." \
    && curl -sSL --retry 5 -o /tmp/toinstall.deb http://mirrors.kernel.org/debian/pool/main/libx/libxp/libxp6_1.0.2-2_amd64.deb \
    && dpkg -i /tmp/toinstall.deb \
    && rm /tmp/toinstall.deb \
    && apt-get install -f \
    && apt-get clean \
    && rm -rf /var/lib/apt/lists/* \
    && curl -fsSL --retry 5 -o "$TMPDIR/MCRInstaller.bin" https://dl.dropbox.com/s/zz6me0c3v4yq5fd/MCR_R2010a_glnxa64_installer.bin \
    && chmod +x "$TMPDIR/MCRInstaller.bin" \
    && "$TMPDIR/MCRInstaller.bin" -silent -P installLocation="/opt/matlabmcr-2010a" \
    && rm -rf "$TMPDIR" \
    && unset TMPDIR \
    && echo "Downloading standalone SPM ..." \
    && curl -fsSL --retry 5 -o /tmp/spm12.zip https://www.fil.ion.ucl.ac.uk/spm/download/restricted/utopia/previous/spm12_r7219_R2010a.zip \
    && unzip -q /tmp/spm12.zip -d /tmp \
    && mkdir -p /opt/spm12-r7219 \
    && mv /tmp/spm12/* /opt/spm12-r7219/ \
    && chmod -R 777 /opt/spm12-r7219 \
    && rm -rf /tmp/spm* \
    && /opt/spm12-r7219/run_spm12.sh /opt/matlabmcr-2010a/v713 quit \
    && sed -i '$iexport SPMMCRCMD=\"/opt/spm12-r7219/run_spm12.sh /opt/matlabmcr-2010a/v713 script\"' $ND_ENTRYPOINT

RUN echo '{ \
    \n  "pkg_manager": "apt", \
    \n  "instructions": [ \
    \n    [ \
    \n      "base", \
    \n      "debian:jessie" \
    \n    ], \
    \n    [ \
    \n      "spm12", \
    \n      { \
    \n        "version": "r7219" \
    \n      } \
    \n    ] \
    \n  ] \
    \n}' > /neurodocker/neurodocker_specs.json

@kaczmarj
Copy link
Collaborator

kaczmarj commented Oct 3, 2019

@mianasbat - what is the issue with the recipe? i was able to build a docker images using that recipe. what is not working for you?

@zswgzx
Copy link

zswgzx commented Mar 23, 2020

I have similar issue (i.e. No JRE found) using ubuntu 18.04 as base image, even after adding 'apt install default-jre' in the docker file. Have to switch to ubuntu 16.04 to make it run through.

Btw, would it be possible to include newer version of spm12 after r7219? Thanks.

@gllmflndn
Copy link
Contributor

@zswgzx - the new versions are listed in #319

For the JRE issue, this is due to the old R2010a MATLAB Runtime. There are some other compiled versions of SPM12 with more recent runtimes in the dev folder, I will try to document this soon and make it more official.

@fhopp
Copy link

fhopp commented Jul 8, 2021

@gllmflndn has there been a solution to the JRE SPM/Matlab problem?

I am trying to create a docker image for ubuntu 20.04. All our workstations run 20.04 (with FSL, SPM, etc.) and hence I would like to have the docker container using the same OS and software version. Using debian:strech for docker works, but produces slightly different results in FSL, likely due to OS variation in floating point precision computations. Thus, I need 20.04 in the container to produce results that are consistent with running FSL on the workstation and in the container.

Long story short, the install fails with the same JRE error as described earlier. Here is the command:

neurodocker generate docker --base ubuntu:20.04 --pkg-manager apt \
 --spm12 version=r7487  --user=neuro > Dockerfile

Any help would be much appreciated!

@gllmflndn
Copy link
Contributor

For the moment, there is a version of SPM12 r7771 with R2019b that we use in SPM's own Dockerfile. I don't think all of the various options are yet directly available in neurodocker (see #394), could you edit the links in the Dockerfile created by neurodocker in the meantime?

@sooyounga
Copy link
Collaborator

sooyounga commented Feb 14, 2023

we are closing this issue because we checked and didn't see any issue with the current example https://www.repronim.org/neurodocker/user_guide/examples.html#spm :

neurodocker generate docker \
    --pkg-manager apt \
    --base-image debian:stretch-slim \
    --spm12 version=r7771 \
> spm12-r7771.Dockerfile

docker build --tag spm12:r7771 --file spm12-r7771.Dockerfile .

[+] Building 176.2s (7/7) FINISHED
 => [internal] load build definition from spm12-r7771.Dockerfile                                                                                                          0.0s
 => => transferring dockerfile: 4.81kB                                                                                                                                    0.0s
 => [internal] load .dockerignore                                                                                                                                         0.0s
 => => transferring context: 2B                                                                                                                                           0.0s
 => [internal] load metadata for docker.io/library/debian:stretch-slim                                                                                                    1.2s
 => [1/3] FROM docker.io/library/debian:stretch-slim@sha256:abaa313c7e1dfe16069a1a42fa254014780f165d4fd084844602edbe29915e70                                              4.9s
 => => resolve docker.io/library/debian:stretch-slim@sha256:abaa313c7e1dfe16069a1a42fa254014780f165d4fd084844602edbe29915e70                                              0.0s
 => => sha256:c5cd3ffceeb25b683bf5111ea89bf8049a177e00fb237235d48076a19cc80097 529B / 529B                                                                                0.0s
 => => sha256:0e23ec2ce5e621c0e8fa57a53c7781d59d57de8c139a8a351b7236530cd85ec2 1.46kB / 1.46kB                                                                            0.0s
 => => sha256:bff3e048017eab8adaed886bad4b3c5c81f7d952b65b056dca8d6dbc198222dd 22.57MB / 22.57MB                                                                          4.3s
 => => sha256:abaa313c7e1dfe16069a1a42fa254014780f165d4fd084844602edbe29915e70 1.21kB / 1.21kB                                                                            0.0s
 => => extracting sha256:bff3e048017eab8adaed886bad4b3c5c81f7d952b65b056dca8d6dbc198222dd                                                                                 0.6s
 => [2/3] RUN export TMPDIR="$(mktemp -d)"     && apt-get update -qq     && apt-get install -y -q --no-install-recommends            bc            ca-certificates      165.1s
 => [3/3] RUN printf '{   "pkg_manager": "apt",   "existing_users": [     "root"   ],   "instructions": [     {       "name": "from_",       "kwds": {         "base_ima  0.3s
 => exporting to image                                                                                                                                                    4.5s
 => => exporting layers                                                                                                                                                   4.5s
 => => writing image sha256:92b3e654a800e4a9911a98dca9a1dd7b2fa20641b21157e870b8eec1d50eb375                                                                              0.0s
 => => naming to docker.io/library/spm12:r7771

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants