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

repo2docker ignores the python environment when the extension is yaml #1373

Open
shaneknapp opened this issue Oct 5, 2024 · 0 comments
Open

Comments

@shaneknapp
Copy link

Bug description

when building an image, if the python environment file is named environment.yaml, the build will default to python 3.10 and skip installing the environment. if you get the build to pass, you will most likely be unable to launch the notebook locally.

Expected behaviour

the image should properly ingest the python env definition regardless of the file extension, especially as yaml.org recommends that you use .yaml over .yml.

Actual behaviour

(dh) ➜  hub-user-image-template git:(update-default-image-config) ✗ mv environment.yml environment.yaml
(dh) ➜  hub-user-image-template git:(update-default-image-config) ✗ ls -l environment.yaml
-rw-r--r-- 1 sknapp sknapp 619 Oct  4 15:00 environment.yaml
(dh) ➜  hub-user-image-template git:(update-default-image-config) ✗ grep python environment.yaml
  - python==3.11.*
(dh) ➜  hub-user-image-template git:(update-default-image-config) ✗ repo2docker .
Picked Local content provider.
Using local repo ..
Python version unspecified, using current default Python version 3.10. This will change in the future.Building conda environment for python=3.10  <----- womp womp!
Using PythonBuildPack builder
Step 1/52 : FROM docker.io/library/buildpack-deps:jammy
^C
(dh) ➜  hub-user-image-template git:(update-default-image-config) ✗ mv environment.yaml environment.yml
(dh) ➜  hub-user-image-template git:(update-default-image-config) repo2docker .
Picked Local content provider.
Using local repo ..
Building conda environment for python=3.11  <------- yay it works!
Using CondaBuildPack builder
Step 1/55 : FROM docker.io/library/buildpack-deps:jammy
 ---> e6c58935b80a
^C

How to reproduce

  1. on the cli: mv environment.yml environment.yaml
  2. run repo2docker in the image directory
  3. see that it's using the default of python 3.10
  4. note that repo2docker then won't ingest environment.yaml later in the build process

Your personal set up

  • OS: ubuntu 22.04 WSL2
  • Docker version: Docker version 23.0.1, build a5ee5b1
  • repo2docker version: 2024.07.0
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

No branches or pull requests

1 participant