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

Create more minimal examles of environment.yml files #739

Closed
joelostblom opened this issue Sep 28, 2023 · 2 comments
Closed

Create more minimal examles of environment.yml files #739

joelostblom opened this issue Sep 28, 2023 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@joelostblom
Copy link
Contributor

joelostblom commented Sep 28, 2023

The environment.yml files for both R and Py in the docs contain many more packages than what seems to be needed. Would it be possible to replace these with a more minimal configuration to increase clarity of what is required for otter to run? This would also make them slightly faster to build locally (about 10% in my experience with otter grade).

For Python

name: otter-env
channels:
    - conda-forge
    - defaults
dependencies:
    - python=3.11.*
    - otter-grader=5.2.2
    - pip

For R

name: otter-env
channels:
    - conda-forge
    - r
    - defaults
dependencies:
  - python=3.11.*
  - pip
  - otter-grader=5.2.2
  - rpy2
  - r-base>=4.1.1
  - r-essentials
  - r-devtools
  - r-gert
  - r-usethis
  - r-testthat
  - r-startup
  - r-rmarkdown
  - r-stringi
  - r-ottr

I understand that some packages are optional, and maybe this could be more clearly included in the env files? For example:

name: otter-env
channels:
    - conda-forge
    - defaults
dependencies:
    - python=3.9
    - otter-grader=5.*
    - pypdf # optional; for pdf export
    - libgomp # opttonal; for ...
    - libgit2 # opttonal; for ...
    - ... # optional; for ...
@nibheis
Copy link
Contributor

nibheis commented Feb 19, 2024

The docker image build process is getting stuck : after investigations, we found out that our docker server is hosted somewhere where the "defaults" channel is not accessible. Downloads from the "defaults" channel receive HTTP 429... + retry in ~ 7 hours.

Side note: this happens when the organization is "in violation of Anaconda's terms of use". I don't know exactly what is going on for our hosting partner, but I'm SURE it falls into the exceptions since it is a public provider for the academic world here in Switzerland (switch.ch).

Anyway, I have not found a way to customize the environment.yml file generation ; we have to fix it manually, inside the .zip, file between the 'assign' and 'grade' steps.

Would you consider removing the problematic 'defaults' channel? or providing a way to get it removed on request?

@chrispyles
Copy link
Member

@joelostblom for Python environments, otter includes some packages by default as a legacy from its roots as an autograder designed for data science courses. I agree that we could trim out all of the dependencies not specifically required by otter, but that's a breaking change (not sure how many users rely on those packages so that they don't need to use their own requirements.txt). The R dependencies are another matter -- all of the listed dependencies besides r-base, r-devtools, and r-ottr were added to fix issues with images builds as they cropped up. I'm not sure if it will be possible to remove them without breaking R image builds. That being said, I do agree that these environments are bloated, and it would be nice to slim them down; I'm just not sure how much it will be possible. I'm tagging this for v6 but it may get pushed to a later major version depending on whether I get a chance to look into it.

@nibheis thanks for pointing this out. It should be relatively easy to add a configuration that allows you to remove the defaults channel from the environment.yml files produced by otter; I've opened #778 as an FR for that.

@chrispyles chrispyles added this to the v6.0.0 milestone Feb 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

3 participants