repo2docker hangs on local install
See original GitHub issueRunning latest repo2docker fresh from pypi:
FROM buildpack-deps:artful
# Set up locales properly
RUN apt-get update && \
apt-get install --yes --no-install-recommends locales && \
apt-get purge && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
locale-gen
ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
# Use bash as default shell, rather than sh
ENV SHELL /bin/bash
# Set up user
ARG NB_USER
ARG NB_UID
ENV USER ${NB_USER}
ENV HOME /home/${NB_USER}
RUN adduser --disabled-password \
--gecos "Default user" \
--uid ${NB_UID} \
${NB_USER}
WORKDIR ${HOME}
RUN apt-get update && \
apt-get install --yes --no-install-recommends \
less \
npm \
&& apt-get purge && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
apt-get install --yes \
python3 \
python3-dev \
python3-venv \
&& apt-get purge && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
EXPOSE 8888
# Almost all environment variables
ENV APP_BASE /srv
ENV VENV_PATH ${APP_BASE}/venv
ENV NB_PYTHON_PREFIX ${VENV_PATH}
# Special case PATH
ENV PATH ${VENV_PATH}/bin:${PATH}
# If scripts required during build are present, copy them
COPY python/requirements.frozen.txt /tmp/requirements.frozen.txt
RUN mkdir -p ${VENV_PATH} && \
chown -R ${NB_USER}:${NB_USER} ${VENV_PATH}
USER ${NB_USER}
RUN python3 -m venv ${VENV_PATH}
RUN pip install --no-cache-dir -r /tmp/requirements.frozen.txt && \
jupyter nbextension enable --py widgetsnbextension --sys-prefix && \
jupyter serverextension enable --py jupyterlab --sys-prefix && \
jupyter serverextension enable nteract_on_jupyter --sys-prefix
# Copy and chown stuff. This doubles the size of the repo, because
# you can't actually copy as USER, only as root! Thanks, Docker!
USER root
COPY src/ ${HOME}
RUN chown -R ${NB_USER}:${NB_USER} ${HOME}
# Run assemble scripts! These will actually build the specification
# in the repository into the image.
RUN apt-get update && \
apt-get install --yes --no-install-recommends pandoc texlive-latex-base texlive-latex-recommended texlive-science texlive-latex-extra texlive-fonts-recommended dvipng ghostscript && \
apt-get purge && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
USER ${NB_USER}
RUN pip3 install --no-cache-dir -r "requirements.txt"
# Container image Labels!
# Put these at the end, since we don't want to rebuild everything
# when these change! Did I mention I hate Dockerfile cache semantics?
# We always want containers to run as non-root
USER ${NB_USER}
RUN ./postBuild
Using PythonBuildPack builder
Step 1/33 : FROM buildpack-deps:artful
---> 15aabadeaee6
Step 2/33 : RUN apt-get update && apt-get install --yes --no-install-recommends locales && apt-get purge && apt-get clean && rm -rf /var/lib/apt/lists/*
---> Using cache
---> a503cac6c9ac
Step 3/33 : RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen
---> Using cache
---> 2f62ac8d042a
Step 4/33 : ENV LC_ALL en_US.UTF-8
---> Using cache
---> 5246ca660498
Step 5/33 : ENV LANG en_US.UTF-8
---> Using cache
---> 46d5ee905d85
Step 6/33 : ENV LANGUAGE en_US.UTF-8
---> Using cache
---> 25ca381c1ccb
Step 7/33 : ENV SHELL /bin/bash
---> Using cache
---> 2f3e4d95e5a6
Step 8/33 : ARG NB_USER
---> Using cache
---> d0da0c76273f
Step 9/33 : ARG NB_UID
---> Using cache
---> 23f9d9d773c6
Step 10/33 : ENV USER ${NB_USER}
---> Using cache
---> 996af037e629
Step 11/33 : ENV HOME /home/${NB_USER}
---> Using cache
---> 09634520cc8c
Step 12/33 : RUN adduser --disabled-password --gecos "Default user" --uid ${NB_UID} ${NB_USER}
---> Running in 14bb574a0353
Adding user `ajh59' ...
Adding new group `ajh59' (494230618) ...
Adding new user `ajh59' (494230618) with group `ajh59' ...
Creating home directory `/home/ajh59' ...
Copying files from `/etc/skel' ...
and then it just hangs. It also seems to break my docker install by using up all memory, though I can’t see where. I wonder if the copy could be infinitely stuck somehow?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:52 (23 by maintainers)
Top Results From Across the Web
repo2docker hangs on local install · Issue #223 - GitHub
Running latest repo2docker fresh from pypi: FROM buildpack-deps:artful # Set up locales properly RUN apt-get update && \ apt-get install ...
Read more >repo2docker 0.9.0 documentation
repo2docker fetches a repository (from GitHub, GitLab or other locations) and builds a container image based on the configuration files found in the...
Read more >jupyterhub/binder - Gitter
i tried to do as you said (install repo2docker) and ran, but i got stuck early on. ""Step 13/66 : RUN adduser --disabled-password...
Read more >Binder getting stuck while installing conda's environment.yml
I would try running the build locally with repo2docker https://repo2docker.readthedocs.io IIRC, it has a debug flag.
Read more >Pip Install hangs - python - Stack Overflow
If you are you using WSL2, indeed it could be related to pip trying to connect to an XServer. If so, clearing the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I might’ve stumbled upon the cause: https://github.com/moby/moby/issues/5419
It sounds like it depends on the capabilities of your Docker host, and whether sparse files are supported:
In this case if your system doesn’t support sparse files
adduser
will attempt to create a 1.2 TB file!I’ve got a PR but the tests are failing: https://github.com/jupyter/repo2docker/pull/804
@betatim sorry for the confusion. You’re right:
This is the same as the default behavior that doesn’t work for us.
repo2docker --user-id `id -u` https://github.com/willingc/ThinkDSP
Passing a
uid
value of 1000 like this, does work for us.repo2docker --user-id 1000 https://github.com/willingc/ThinkDSP