Closed DeepHorizons closed 7 years ago
At the moment, the 2.3 release and the development branch are almost identical. I don't understand why one would work and not the other. Can you confirm that you installed both/either into a clean environment?
If it is still an issue, can you make a minimal bootstrap definition file, as simple as possible that reproduces this, and I (and maybe others) can try to run it.
Thanks!
hey @DeepHorizons - it looks like you are just mirroring this container, almost to a T:
https://github.com/jupyter/docker-stacks/blob/master/base-notebook/Dockerfile
Why not just bootstrap that Docker image?
I noticed in your examples you were trying to run files that exist in the original repo, but I'm bnot sure how they would be present in the image unless you downloaded them. So I adjusted the Singularity file a bit, and this worked perfect for me:
BootStrap: docker
From: debian:stretch
%labels
AUTHOR https://github.com/jupyter/docker-stacks/tree/master/base-notebook
%environment
export CONDA_DIR=/opt/conda
export PATH=$CONDA_DIR/bin:$PATH
export SHELL=/bin/bash
export NB_USER=jovyan
export NB_UID=1000
export HOME=/home/$NB_USER
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
%post
# add universe repo to apt sources and install some packages
DEBIAN_FRONTEND=noninteractive
export DEBIAN_FRONTEND
#sed -i '/deb/ s/$/ universe/' /etc/apt/sources.list
sed -i "s/http:\/\/us.archive.ubuntu.com/http:\/\/mirrors.rit.edu/g" /etc/apt/sources.list
# Delete any old cache
apt-get clean
rm -rf /var/lib/apt/lists/*
apt-get update && apt-get install -yq --no-install-recommends \
wget \
bzip2 \
ca-certificates \
locales \
fonts-liberation
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
locale-gen
# Install Tini
export CONDA_DIR=/opt/conda
export PATH=$CONDA_DIR/bin:$PATH
export SHELL=/bin/bash
export NB_USER=jovyan
export NB_UID=1000
export HOME=/home/$NB_USER
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
# Install conda as jovyan
cd /tmp
mkdir -p $CONDA_DIR
wget --quiet https://repo.continuum.io/miniconda/Miniconda3-4.2.12-Linux-x86_64.sh
echo "c59b3dd3cad550ac7596e0d599b91e75d88826db132e4146030ef471bb434e9a *Miniconda3-4.2.12-Linux-x86_64.sh" | sha256sum -c -
/bin/bash Miniconda3-4.2.12-Linux-x86_64.sh -f -b -p $CONDA_DIR
rm Miniconda3-4.2.12-Linux-x86_64.sh
$CONDA_DIR/bin/conda config --system --add channels conda-forge
$CONDA_DIR/bin/conda config --system --set auto_update_conda false
conda clean -tipsy
# Install Jupyter Notebook and Hub
conda install --quiet --yes \
'notebook=5.0.*' \
'jupyterhub=0.7.*' \
'jupyterlab=0.18.*' \
&& conda clean -tipsy
wget https://raw.githubusercontent.com/jupyter/docker-stacks/master/base-notebook/start.sh
mv start.sh /usr/local/bin
chmod u+x /usr/local/bin/start.sh
%runscript
exec /bin/bash /usr/local/bin/start.sh jupyter notebook "$@"
and then to generate:
singularity create --size 6000 conda.img
sudo singularity bootstrap conda.img Singularity
and to run you have to bind to the run directory (to get write as a user)
singularity run -B /tmp:/run/user conda.img
whala, notebook! And opening up showed all the crap in my /tmp
directory, lol. Again, you could probably just have bootstrapped that docker image that had already done this.
@vsoch I am mirroring the container, but I'm not basing it off of debian. I've built a custom base image that we use on our cluster here at RIT that enables GPU support among other things. I then overlay the notebook on that. The debian bootstrap was just for example. As for the files, I downloaded the files and I add them in in the %setup
step. I omitted them for brevity. Thanks for the example, nice to see %labels
and %environment
working!
I did more experimentation and was able to reproduce the bug consistently. It seems to be a problem with overlaying.
singularity create -s 1024 image.img
singularity bootstrap image.img test1.def
singularity bootstrap image.img test2.def
test1.def
BootStrap: docker
From: ubuntu:16.04
test2.def
%post
apt-get update && apt-get install -yq --no-install-recommends \
sudo \
emacsen-common \
fontconfig-config \
tex-common
All those installs fail with some sort of invalid user error. If any of those packages are moved into the first definition file, they install just fine.
I've reproduced this and know why it is happening. Fixing, standby...
Please see the fix in the development branch, and let me know if that helps!
Thanks!
That fixed it, thanks @gmkurtzer!
Version of Singularity:
Working: 2.2.1 Broken: 2.3 Gets farther: development branch
Expected behavior
Installing packages succeeds.
Actual behavior
Installing some packages fails.
apt
has several complaints,W: No sandbox user '_apt' on the system, can not drop privileges
chown: invalid user: 'root:root'
chown: invalid user: 'root:staff'
Installing
sudo
fails on 2.3, andemacsen-common
fails on the development branch.Running the development branch, bootstrapping one file seems to work, then bootstrapping a second file fails.
Steps to reproduce behavior
base-notebook.def (Will fail on 2.3, succeed on development)
minimal-notebook.def (Fails on development branch)
Here is a sample log from 2.3 from the base-notebook.def