astropy / astropy-tutorials

Tutorials for the Astropy Project
BSD 3-Clause "New" or "Revised" License
293 stars 178 forks source link

Binder hosting not working #615

Open skgrunblatt opened 1 week ago

skgrunblatt commented 1 week ago

Attempts to run tutorials on binder not working. Binder log reads as follows:

Waiting for build to start... Picked Git content provider. Cloning into '/tmp/repo2dockerysg478cb'... HEAD is now at 4c373d7 Merge pull request #606 from jeffjennings/requirements Building conda environment for python=3.9 Using CondaBuildPack builder Step 1/49 : FROM docker.io/library/buildpack-deps:jammy ---> e6c58935b80a Step 2/49 : ENV DEBIAN_FRONTEND=noninteractive ---> Using cache ---> b13f6f24df41 Step 3/49 : 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 ---> a39861d97e74 Step 4/49 : RUN echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && locale-gen ---> Using cache ---> afabfaf20da4 Step 5/49 : ENV LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 ---> Using cache ---> e1c773e777d1 Step 6/49 : ENV SHELL=/bin/bash ---> Using cache ---> 678c1454b3a1 Step 7/49 : ARG NB_USER ---> Using cache ---> 070487eb764b Step 8/49 : ARG NB_UID ---> Using cache ---> 221dc8d38012 Step 9/49 : ENV USER=${NB_USER} HOME=/home/${NB_USER} ---> Using cache ---> d5794176337d Step 10/49 : 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 ---> e82998c22aef Step 11/49 : RUN apt-get -qq update && apt-get -qq install --yes --no-install-recommends gettext-base less unzip > /dev/null && apt-get -qq purge && apt-get -qq clean && rm -rf /var/lib/apt/lists/ ---> Using cache ---> ad3cea098780 Step 12/49 : EXPOSE 8888 ---> Using cache ---> 7c2e8db00ee5 Step 13/49 : ENV APP_BASE=/srv ---> Using cache ---> b2ff73a294a8 Step 14/49 : ENV CONDA_DIR=${APP_BASE}/conda ---> Using cache ---> 882b598b1179 Step 15/49 : ENV NB_PYTHON_PREFIX=${CONDA_DIR}/envs/notebook ---> Using cache ---> 26317ba458b6 Step 16/49 : ENV NPM_DIR=${APP_BASE}/npm ---> Using cache ---> 2cc5dc41ba26 Step 17/49 : ENV NPM_CONFIG_GLOBALCONFIG=${NPM_DIR}/npmrc ---> Using cache ---> 53fcc0106bf1 Step 18/49 : ENV NB_ENVIRONMENT_FILE=/tmp/env/environment.lock ---> Using cache ---> a11cf313c240 Step 19/49 : ENV MAMBA_ROOT_PREFIX=${CONDA_DIR} ---> Using cache ---> 95747ae864c0 Step 20/49 : ENV MAMBA_EXE=${CONDA_DIR}/bin/mamba ---> Using cache ---> b494459ca425 Step 21/49 : ENV CONDA_PLATFORM=linux-64 ---> Using cache ---> 0eb34c8bd954 Step 22/49 : ENV KERNEL_PYTHON_PREFIX=${NB_PYTHON_PREFIX} ---> Using cache ---> bba00eeb8872 Step 23/49 : ENV PATH=${NB_PYTHON_PREFIX}/bin:${CONDA_DIR}/bin:${NPM_DIR}/bin:${PATH} ---> Using cache ---> 4f50af22b168 Step 24/49 : COPY --chown=1000:1000 build_script_files/-2fopt-2fvenv-2flib-2fpython3-2e11-2fsite-2dpackages-2frepo2docker-2fbuildpacks-2fconda-2factivate-2dconda-2esh-e70a7b /etc/profile.d/activate-conda.sh ---> Using cache ---> 5a061bd47d23 Step 25/49 : COPY --chown=1000:1000 build_script_files/-2fopt-2fvenv-2flib-2fpython3-2e11-2fsite-2dpackages-2frepo2docker-2fbuildpacks-2fconda-2fenvironment-2epy-2d3-2e9-2dlinux-2d64-2elock-4a3b39 /tmp/env/environment.lock ---> Using cache ---> e4b404c9e27a Step 26/49 : COPY --chown=1000:1000 build_script_files/-2fopt-2fvenv-2flib-2fpython3-2e11-2fsite-2dpackages-2frepo2docker-2fbuildpacks-2fconda-2finstall-2dbase-2denv-2ebash-6a6072 /tmp/install-base-env.bash ---> Using cache ---> 6b40f7d0756f Step 27/49 : RUN TIMEFORMAT='time: %3R' bash -c 'time /tmp/install-base-env.bash' && rm -rf /tmp/install-base-env.bash /tmp/env ---> Using cache ---> d8ea84257351 Step 28/49 : RUN mkdir -p ${NPM_DIR} && chown -R ${NB_USER}:${NB_USER} ${NPM_DIR} ---> Using cache ---> 344beff86736 Step 29/49 : USER root ---> Using cache ---> 452771966f05 Step 30/49 : ARG REPO_DIR=${HOME} ---> Using cache ---> 8ed60776b028 Step 31/49 : ENV REPO_DIR=${REPO_DIR} ---> Using cache ---> 353870d83e78 Step 32/49 : RUN if [ ! -d "${REPO_DIR}" ]; then /usr/bin/install -o ${NB_USER} -g ${NB_USER} -d "${REPO_DIR}"; fi ---> Using cache ---> f80d063e2aa7 Step 33/49 : WORKDIR ${REPO_DIR} ---> Using cache ---> 528f281c6619 Step 34/49 : RUN chown ${NB_USER}:${NB_USER} ${REPO_DIR} ---> Using cache ---> cca6c3941ad3 Step 35/49 : ENV PATH=${HOME}/.local/bin:${REPO_DIR}/.local/bin:${PATH} ---> Using cache ---> 4f2b1b9391f4 Step 36/49 : ENV CONDA_DEFAULT_ENV=${KERNEL_PYTHON_PREFIX} ---> Using cache ---> d8a2efb9bbd4 Step 37/49 : USER root ---> Using cache ---> b48d3fe8df64 Step 38/49 : COPY --chown=1000:1000 src/ ${REPO_DIR}/ ---> 9e0a067bdb90 Step 39/49 : USER ${NB_USER} ---> Running in ecac437caa63 ---> Removed intermediate container ecac437caa63 ---> e1f986411914 Step 40/49 : RUN TIMEFORMAT='time: %3R' bash -c 'time ${MAMBA_EXE} env update -p ${NB_PYTHON_PREFIX} --file "environment.yml" && time ${MAMBA_EXE} clean --all -f -y && ${MAMBA_EXE} list -p ${NB_PYTHON_PREFIX} ' ---> Running in af434792c499 Channels:

==> WARNING: A newer version of conda exists. <== current version: 24.5.0 latest version: 24.9.2

Please update conda by running

$ conda update -n base -c conda-forge conda

Downloading and Extracting Packages: ...working... done Preparing transaction: ...working... done Verifying transaction: ...working... done Executing transaction: ...working... done Installing pip dependencies: ...working... Pip subprocess error: ERROR: Could not open requirements file: [Errno 2] No such file or directory: '/home/jovyan/requirements.txt'

Ran pip subprocess with arguments: ['/srv/conda/envs/notebook/bin/python', '-m', 'pip', 'install', '-U', '-r', '/home/jovyan/condaenv.61dlyz9g.requirements.txt', '--exists-action=b'] Pip subprocess output:

failed

CondaEnvException: Pip failed

time: 37.037 ---> Removed intermediate container af434792c499 The command '/bin/sh -c TIMEFORMAT='time: %3R' bash -c 'time ${MAMBA_EXE} env update -p ${NB_PYTHON_PREFIX} --file "environment.yml" && time ${MAMBA_EXE} clean --all -f -y && ${MAMBA_EXE} list -p ${NB_PYTHON_PREFIX} '' returned a non-zero code: 1

jeffjennings commented 5 days ago

Hi Samuel, thank you for opening an issue. We're in the process of reworking the notebooks, and the error arises because there's no longer a requirements.txt file in the root of the repo (instead there are now individual requirements files in each folder in tutorials). So for the moment, I forked and made a branch that enables Binder to build successfully - the Binder link is here.

Let me know if you have any problems using that. It's not a long-term solution, but I've made a note to fix this properly and will update the binder link on the main repo when that's done.

skgrunblatt commented 5 days ago

Thanks Jeff! I was also able to get the tutorials running using Google Colab, that might be a simpler long-term solution: https://colab.research.google.com/github/astropy/astropy-tutorials/blob/main/tutorials/SpectroscopicDataReductionBasics/3-Trace_Extract_Wavelength-CalibrateSpectrum.ipynb

Best,

Sam


Dr. Samuel K. Grunblatt Assistant Professor Department of Physics & Astronomy University of Alabama skgrunblatt.github.io

On Tue, Oct 22, 2024 at 3:34 PM Jeff Jennings @.***> wrote:

Hi Samuel, thank you for opening an issue. We're in the process of reworking the notebooks, and the error arises because there's no longer a requirements.txt file in the root of the repo (instead there are now individual requirements files in each folder in tutorials). So for the moment, I forked and made a branch that enables Binder to build successfully - see here https://mybinder.org/v2/gh/jeffjennings/astropy-tutorials/binder_build?labpath=tutorials .

Let me know if you have any problems using that. It's not a long-term solution, but I've made a note to fix this properly and will update the binder link on the main repo when that's done.

— Reply to this email directly, view it on GitHub https://github.com/astropy/astropy-tutorials/issues/615#issuecomment-2430208197, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABNDTTDDE7FH5XQGTUBAZSLZ42ZE7AVCNFSM6AAAAABQG2P4O2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZQGIYDQMJZG4 . You are receiving this because you authored the thread.Message ID: @.***>

jeffjennings commented 3 days ago

That's a great idea, thanks Sam!