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

Unexpected behavior of runtime.txt configuration file #253

Open
LuisGMM opened this issue Feb 3, 2022 · 3 comments
Open

Unexpected behavior of runtime.txt configuration file #253

LuisGMM opened this issue Feb 3, 2022 · 3 comments
Labels

Comments

@LuisGMM
Copy link

LuisGMM commented Feb 3, 2022

Bug description

According to the guide (https://mybinder.readthedocs.io/en/latest/howto/languages.html#specifying-a-version-of-python) when using the requirements.txt file, a second file called runtime.txt can be used to specify the python version, but it does not seem to work (completely?). In the log below can be seen as it apparently loads an environment with python 3.10:

Building conda environment for python=3.10Using PythonBuildPack builder
Building conda environment for python=3.10Building conda environment for python=3.10

But a few lines after, it starts asking the modules for other version of python

Log
Waiting for build to start...
Picked Git content provider.
Cloning into '/tmp/repo2docker9hl7vaq0'...
HEAD is now at 67d89f45 Removed requirements.txt and runtime.txt
Building conda environment for python=3.10Using PythonBuildPack builder
Building conda environment for python=3.10Building conda environment for python=3.10Step 1/53 : FROM buildpack-deps:bionic

 ---> 2db1fa0a8732
Step 2/53 : ENV DEBIAN_FRONTEND=noninteractive
 ---> Using cache
 ---> c4be527842e7
Step 3/53 : RUN apt-get -qq update &&     apt-get -qq install --yes --no-install-recommends locales > /dev/null &&     apt-get -qq purge &&     apt-get -qq clean &&     rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 522790fe583d
Step 4/53 : RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen &&     locale-gen
 ---> Using cache
 ---> 0a1b0e069082
Step 5/53 : ENV LC_ALL en_US.UTF-8
 ---> Using cache
 ---> 8e66f6653989
Step 6/53 : ENV LANG en_US.UTF-8
 ---> Using cache
 ---> 22edaf4e8453
Step 7/53 : ENV LANGUAGE en_US.UTF-8
 ---> Using cache
 ---> 36af3a79fe10
Step 8/53 : ENV SHELL /bin/bash
 ---> Using cache
 ---> e09e0d6bab8f
Step 9/53 : ARG NB_USER
 ---> Using cache
 ---> 8bfc8147f921
Step 10/53 : ARG NB_UID
 ---> Using cache
 ---> 0f412242aeed
Step 11/53 : ENV USER ${NB_USER}
 ---> Using cache
 ---> 6d30f4e83977
Step 12/53 : ENV HOME /home/${NB_USER}
 ---> Using cache
 ---> 3e7464d59708
Step 13/53 : RUN groupadd         --gid ${NB_UID}         ${NB_USER} &&     useradd         --comment "Default user"         --create-home         --gid ${NB_UID}         --no-log-init         --shell /bin/bash         --uid ${NB_UID}         ${NB_USER}
 ---> Using cache
 ---> 8664e4fba62d
Step 14/53 : RUN apt-get -qq update &&     apt-get -qq install --yes --no-install-recommends        less        unzip        > /dev/null &&     apt-get -qq purge &&     apt-get -qq clean &&     rm -rf /var/lib/apt/lists/*
 ---> Using cache
 ---> 24426d7ac731
Step 15/53 : EXPOSE 8888
 ---> Using cache
 ---> b74cd1477a99
Step 16/53 : ENV APP_BASE /srv
 ---> Using cache
 ---> 44415ebdd4c7
Step 17/53 : ENV CONDA_DIR ${APP_BASE}/conda
 ---> Using cache
 ---> ce293998e209
Step 18/53 : ENV NB_PYTHON_PREFIX ${CONDA_DIR}/envs/notebook
 ---> Using cache
 ---> 304392d6afcf
Step 19/53 : ENV NPM_DIR ${APP_BASE}/npm
 ---> Using cache
 ---> 592af4ed4ec6
Step 20/53 : ENV NPM_CONFIG_GLOBALCONFIG ${NPM_DIR}/npmrc
 ---> Using cache
 ---> 4eba97d79554
Step 21/53 : ENV NB_ENVIRONMENT_FILE /tmp/env/environment.lock
 ---> Using cache
 ---> 5b0fe08efc5e
Step 22/53 : ENV MAMBA_ROOT_PREFIX ${CONDA_DIR}
 ---> Using cache
 ---> 1e5f22ad77a4
Step 23/53 : ENV MAMBA_EXE ${CONDA_DIR}/bin/mamba
 ---> Using cache
 ---> 2778a0246188
Step 24/53 : ENV KERNEL_PYTHON_PREFIX ${NB_PYTHON_PREFIX}
 ---> Using cache
 ---> e7362f318a58
Step 25/53 : ENV PATH ${NB_PYTHON_PREFIX}/bin:${CONDA_DIR}/bin:${NPM_DIR}/bin:${PATH}
 ---> Using cache
 ---> 2b15b72f0c01
Step 26/53 : COPY --chown=1000:1000 build_script_files/-2fusr-2flib-2fpython3-2e8-2fsite-2dpackages-2frepo2docker-2fbuildpacks-2fconda-2factivate-2dconda-2esh-391af5 /etc/profile.d/activate-conda.sh
 ---> Using cache
 ---> eb2154f05724
Step 27/53 : COPY --chown=1000:1000 build_script_files/-2fusr-2flib-2fpython3-2e8-2fsite-2dpackages-2frepo2docker-2fbuildpacks-2fconda-2fenvironment-2elock-1dbdca /tmp/env/environment.lock
 ---> Using cache
 ---> f6cf8879c6a9
Step 28/53 : COPY --chown=1000:1000 build_script_files/-2fusr-2flib-2fpython3-2e8-2fsite-2dpackages-2frepo2docker-2fbuildpacks-2fconda-2finstall-2dbase-2denv-2ebash-8fbb20 /tmp/install-base-env.bash
 ---> Using cache
 ---> 70317889a609
Step 29/53 : RUN TIMEFORMAT='time: %3R' bash -c 'time /tmp/install-base-env.bash' && rm -rf /tmp/install-base-env.bash /tmp/env
 ---> Using cache
 ---> 5ab596de5d78
Step 30/53 : RUN mkdir -p ${NPM_DIR} && chown -R ${NB_USER}:${NB_USER} ${NPM_DIR}
 ---> Using cache
 ---> 2412b0a3c5da
Step 31/53 : USER root
 ---> Using cache
 ---> e254b2ebaad0
Step 32/53 : ARG REPO_DIR=${HOME}
 ---> Using cache
 ---> 39a05327ef23
Step 33/53 : ENV REPO_DIR ${REPO_DIR}
 ---> Using cache
 ---> e0307458f8be
Step 34/53 : WORKDIR ${REPO_DIR}
 ---> Using cache
 ---> f95447dfd3e5
Step 35/53 : RUN chown ${NB_USER}:${NB_USER} ${REPO_DIR}
 ---> Using cache
 ---> 3b1f38eaf32f
Step 36/53 : ENV PATH ${HOME}/.local/bin:${REPO_DIR}/.local/bin:${PATH}
 ---> Using cache
 ---> 4b6fde76ebe8
Step 37/53 : ENV CONDA_DEFAULT_ENV ${KERNEL_PYTHON_PREFIX}
 ---> Using cache
 ---> cd87cab70e19
Step 38/53 : COPY --chown=1000:1000 src/binder/requirements.txt ${REPO_DIR}/binder/requirements.txt
 ---> Using cache
 ---> 5dcb69e560cf
Step 39/53 : USER ${NB_USER}
 ---> Using cache
 ---> 22daa31b5c0b
Step 40/53 : RUN ${KERNEL_PYTHON_PREFIX}/bin/pip install --no-cache-dir -r "binder/requirements.txt"
 ---> Running in 74264c6a62f3
Collecting poliastro
  Cloning https://github.com/poliastro/poliastro.git to /tmp/pip-install-iw4ztkjq/poliastro_70ce0be933f04146abae2a896501d8bd
�[91m  Running command git clone --filter=blob:none -q https://github.com/poliastro/poliastro.git /tmp/pip-install-iw4ztkjq/poliastro_70ce0be933f04146abae2a896501d8bd
�[0m  Resolved https://github.com/poliastro/poliastro.git to commit da11159b8d00e56125ecff741d683dd06dcd8be8
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
Collecting jupytext>=1.13.3
  Downloading jupytext-1.13.6-py3-none-any.whl (297 kB)
�[91mERROR: Could not find a version that satisfies the requirement astropy<6,>=5.0 (from poliastro) (from versions: 0.1, 0.2, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.3, 0.3.1, 0.3.2, 0.4rc1, 0.4rc2, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.4.6, 1.0rc1, 1.0rc2, 1.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.8, 1.0.9, 1.0.10, 1.0.11, 1.0.12, 1.0.13, 1.1b1, 1.1rc1, 1.1rc2, 1.1, 1.1.post1, 1.1.post2, 1.1.1, 1.1.2, 1.2rc1, 1.2, 1.2.1, 1.2.2, 1.3rc1, 1.3, 1.3.1, 1.3.2, 1.3.3, 2.0rc1, 2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.0.10, 2.0.11, 2.0.12, 2.0.13, 2.0.14, 2.0.15, 2.0.16, 3.0rc1, 3.0rc2, 3.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.1rc1, 3.1rc2, 3.1, 3.1.1, 3.1.2, 3.2rc1, 3.2rc2, 3.2, 3.2.1, 3.2.2, 3.2.3, 4.0rc1, 4.0rc2, 4.0, 4.0.1, 4.0.1.post1, 4.0.2, 4.0.3, 4.0.4, 4.0.5, 4.0.6.dev27461, 4.0.6, 4.1rc1, 4.1rc2, 4.1, 4.2rc1, 4.2, 4.2.1, 4.3rc1, 4.3, 4.3.post1, 4.3.1)
�[0m�[91mERROR: No matching distribution found for astropy<6,>=5.0
�[0mRemoving intermediate container 74264c6a62f3
The command '/bin/sh -c ${KERNEL_PYTHON_PREFIX}/bin/pip install --no-cache-dir -r "binder/requirements.txt"' returned a non-zero code: 1Built image, launching...
Failed to connect to event stream

our requirements.txt file is

git+https://github.com/poliastro/poliastro.git#egg=poliastro

jupytext>=1.13.3  

and the runtime.txt is

python-3.10

They are both located in a folder a the root of the project -> src/binder/

It is worth mentioning that trying the configuration file environment.yml containing

name: python 3.10
dependencies:
  - python=3.10
  - jupytext>=1.13.3

placed in the same folder works fine.

Also, may it be related to issue 252?

@LuisGMM LuisGMM added the bug label Feb 3, 2022
@welcome
Copy link

welcome bot commented Feb 3, 2022

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@astrojuanlu
Copy link
Contributor

This just happened to me again in a different repository, any comment on what might be happening here?

astrojuanlu added a commit to astrojuanlu/scipy-us-2022-poliastro-talk that referenced this issue Jul 11, 2022
@astrojuanlu
Copy link
Contributor

Wondering if this should really belong to https://github.com/jupyterhub/repo2docker/

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

No branches or pull requests

2 participants