Skip to content

Commit

Permalink
Switch from mambaforge to miniforge (#847)
Browse files Browse the repository at this point in the history
* switch from mambaforge to miniforge

* change mambaforge to miniforge path
  • Loading branch information
chrispyles authored Oct 1, 2024
1 parent 3f4e989 commit b751087
Show file tree
Hide file tree
Showing 30 changed files with 114 additions and 105 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

**v5.7.0:**

* Switch grading image from Mambaforge to Miniforge due to the [sunestting of Mambaforge](https://conda-forge.org/news/2024/07/29/sunsetting-mambaforge/) per [#846](https://github.com/ucbds-infra/otter-grader/issues/846)

**v5.6.0:**

* Updated Otter Grade to write grading summary for each notebook per [#814](https://github.com/ucbds-infra/otter-grader/issues/814)
Expand Down
4 changes: 2 additions & 2 deletions docs/_static/python_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ dpkg -i /tmp/pandoc.deb

# install mamba
if [ $(uname -p) = "arm" ] || [ $(uname -p) = "aarch64" ] ; \
then wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-aarch64.sh \
then wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh \
-O /autograder/source/mamba_install.sh ; \
else wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh \
else wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh \
-O /autograder/source/mamba_install.sh ; \
fi
chmod +x /autograder/source/mamba_install.sh
Expand Down
4 changes: 2 additions & 2 deletions docs/_static/r_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ dpkg -i /tmp/pandoc.deb

# install mamba
if [ $(uname -p) = "arm" ] || [ $(uname -p) = "aarch64" ] ; \
then wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-aarch64.sh \
then wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh \
-O /autograder/source/mamba_install.sh ; \
else wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh \
else wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh \
-O /autograder/source/mamba_install.sh ; \
fi
chmod +x /autograder/source/mamba_install.sh
Expand Down
6 changes: 3 additions & 3 deletions otter/generate/templates/common/run_autograder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
export PATH="/root/mambaforge/bin:$PATH"
source /root/mambaforge/etc/profile.d/conda.sh
source /root/mambaforge/etc/profile.d/mamba.sh
export PATH="/root/miniforge3/bin:$PATH"
source /root/miniforge3/etc/profile.d/conda.sh
source /root/miniforge3/etc/profile.d/mamba.sh
mamba activate {{ otter_env_name }}
python {{ autograder_dir }}/source/run_otter.py
8 changes: 4 additions & 4 deletions otter/generate/templates/python/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ dpkg -i /tmp/pandoc.deb

# install mamba
if [ $(uname -p) = "arm" ] || [ $(uname -p) = "aarch64" ] ; \
then wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-aarch64.sh \
then wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh \
-O {{ autograder_dir }}/source/mamba_install.sh ; \
else wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh \
else wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh \
-O {{ autograder_dir }}/source/mamba_install.sh ; \
fi
chmod +x {{ autograder_dir }}/source/mamba_install.sh
{{ autograder_dir }}/source/mamba_install.sh -b
echo "export PATH=/root/mambaforge/bin:\$PATH" >> /root/.bashrc
echo "export PATH=/root/miniforge3/bin:\$PATH" >> /root/.bashrc

export PATH=/root/mambaforge/bin:$PATH
export PATH=/root/miniforge3/bin:$PATH
export TAR="/bin/tar"

# install dependencies with mamba
Expand Down
8 changes: 4 additions & 4 deletions otter/generate/templates/r/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ dpkg -i /tmp/pandoc.deb

# install mamba
if [ $(uname -p) = "arm" ] || [ $(uname -p) = "aarch64" ] ; \
then wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-aarch64.sh \
then wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh \
-O {{ autograder_dir }}/source/mamba_install.sh ; \
else wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh \
else wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh \
-O {{ autograder_dir }}/source/mamba_install.sh ; \
fi
chmod +x {{ autograder_dir }}/source/mamba_install.sh
{{ autograder_dir }}/source/mamba_install.sh -b
echo "export PATH=/root/mambaforge/bin:\$PATH" >> /root/.bashrc
echo "export PATH=/root/miniforge3/bin:\$PATH" >> /root/.bashrc

export PATH=/root/mambaforge/bin:$PATH
export PATH=/root/miniforge3/bin:$PATH
export TAR="/bin/tar"

# install dependencies with mamba{% if channel_priority_strict %}
Expand Down
5 changes: 5 additions & 0 deletions otter/grade/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ RUN dos2unix /autograder/run_autograder /autograder/source/setup.sh && \
ADD otter_config.json run_otter.py /autograder/source/
ADD files* /autograder/source/files/
ADD tests /autograder/source/tests/

ENV PATH=/root/miniforge3/bin:$PATH
ADD __otter-grader /tmp/otter-grader
RUN mamba run -n otter-env pip install /tmp/otter-grader
RUN rm -rf /tmp/*
44 changes: 22 additions & 22 deletions otter/run/run_autograder/autograder_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class AutograderConfig(fica.Config):
)

points_possible = fica.Key(
description="a custom total score for the assignment; if unspecified the sum of question " \
"point values is used.",
description="a custom total score for the assignment; if unspecified the sum of question "
"point values is used.",
default=None,
)

Expand Down Expand Up @@ -45,20 +45,20 @@ class AutograderConfig(fica.Config):
)

grade_from_log = fica.Key(
description="whether to re-assemble the student's environment from the log rather than " \
"by re-executing their submission",
description="whether to re-assemble the student's environment from the log rather than "
"by re-executing their submission",
default=False,
)

serialized_variables = fica.Key(
description="a mapping of variable names to type strings for validating a deserialized " \
"student environment",
description="a mapping of variable names to type strings for validating a deserialized "
"student environment",
default=None,
)

pdf = fica.Key(
description="whether to generate a PDF of the notebook when not using Gradescope " \
"auto-upload",
description="whether to generate a PDF of the notebook when not using Gradescope "
"auto-upload",
default=False,
)

Expand Down Expand Up @@ -105,7 +105,7 @@ class AutograderConfig(fica.Config):

miniconda_path = fica.Key(
description="the path to the mamba install directory",
default="/root/mambaforge",
default="/root/miniforge3",
)

plugins = fica.Key(
Expand Down Expand Up @@ -134,39 +134,39 @@ class AutograderConfig(fica.Config):
)

log_level = fica.Key(
description="a log level for logging messages; any value suitable for " \
"``logging.Logger.setLevel``",
description="a log level for logging messages; any value suitable for "
"``logging.Logger.setLevel``",
default=None,
)

assignment_name = fica.Key(
description="a name for the assignment to ensure that students submit to the correct " \
"autograder",
description="a name for the assignment to ensure that students submit to the correct "
"autograder",
default=None,
)

warn_missing_pdf = fica.Key(
description="whether to add a 0-point public test to the Gradescope output to indicate " \
"to students whether a PDF was found/generated for this assignment",
description="whether to add a 0-point public test to the Gradescope output to indicate "
"to students whether a PDF was found/generated for this assignment",
default=False,
)

force_public_test_summary = fica.Key(
description="whether to show a summary of public test case results when show_hidden is " \
"true",
description="whether to show a summary of public test case results when show_hidden is "
"true",
default=True,
)

submit_blank_pdf_on_export_failure = fica.Key(
description="whether to submit a blank PDF to the manual-grading Gradescope assignment " \
"if a PDF cannot be generated from the submission",
description="whether to submit a blank PDF to the manual-grading Gradescope assignment "
"if a PDF cannot be generated from the submission",
default=False,
)

use_submission_pdf = fica.Key(
description="use the PDF in the submission zip file instead of exporting a new one; if " \
"no PDF is present, a new one is generated anyway; assumes there is only 1 PDF file " \
"in the submission",
description="use the PDF in the submission zip file instead of exporting a new one; if "
"no PDF is present, a new one is generated anyway; assumes there is only 1 PDF file "
"in the submission",
default=False,
)

Expand Down
2 changes: 1 addition & 1 deletion test/files/partial-dockerfile.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ENV PATH=/root/mambaforge/bin:$PATH
ENV PATH=/root/miniforge3/bin:$PATH
ADD __otter-grader /tmp/otter-grader
RUN mamba run -n otter-env pip install /tmp/otter-grader
RUN rm -rf /tmp/*
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
export PATH="/root/mambaforge/bin:$PATH"
source /root/mambaforge/etc/profile.d/conda.sh
source /root/mambaforge/etc/profile.d/mamba.sh
export PATH="/root/miniforge3/bin:$PATH"
source /root/miniforge3/etc/profile.d/conda.sh
source /root/miniforge3/etc/profile.d/mamba.sh
mamba activate otter-env
python /autograder/source/run_otter.py
8 changes: 4 additions & 4 deletions test/test_assign/files/example-autograder-correct/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ dpkg -i /tmp/pandoc.deb

# install mamba
if [ $(uname -p) = "arm" ] || [ $(uname -p) = "aarch64" ] ; \
then wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-aarch64.sh \
then wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh \
-O /autograder/source/mamba_install.sh ; \
else wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh \
else wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh \
-O /autograder/source/mamba_install.sh ; \
fi
chmod +x /autograder/source/mamba_install.sh
/autograder/source/mamba_install.sh -b
echo "export PATH=/root/mambaforge/bin:\$PATH" >> /root/.bashrc
echo "export PATH=/root/miniforge3/bin:\$PATH" >> /root/.bashrc

export PATH=/root/mambaforge/bin:$PATH
export PATH=/root/miniforge3/bin:$PATH
export TAR="/bin/tar"

# install dependencies with mamba
Expand Down
6 changes: 3 additions & 3 deletions test/test_assign/files/gs-autograder-correct/run_autograder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
export PATH="/root/mambaforge/bin:$PATH"
source /root/mambaforge/etc/profile.d/conda.sh
source /root/mambaforge/etc/profile.d/mamba.sh
export PATH="/root/miniforge3/bin:$PATH"
source /root/miniforge3/etc/profile.d/conda.sh
source /root/miniforge3/etc/profile.d/mamba.sh
mamba activate otter-env
python /autograder/source/run_otter.py
8 changes: 4 additions & 4 deletions test/test_assign/files/gs-autograder-correct/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ dpkg -i /tmp/pandoc.deb

# install mamba
if [ $(uname -p) = "arm" ] || [ $(uname -p) = "aarch64" ] ; \
then wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-aarch64.sh \
then wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh \
-O /autograder/source/mamba_install.sh ; \
else wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh \
else wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh \
-O /autograder/source/mamba_install.sh ; \
fi
chmod +x /autograder/source/mamba_install.sh
/autograder/source/mamba_install.sh -b
echo "export PATH=/root/mambaforge/bin:\$PATH" >> /root/.bashrc
echo "export PATH=/root/miniforge3/bin:\$PATH" >> /root/.bashrc

export PATH=/root/mambaforge/bin:$PATH
export PATH=/root/miniforge3/bin:$PATH
export TAR="/bin/tar"

# install dependencies with mamba
Expand Down
6 changes: 3 additions & 3 deletions test/test_assign/files/rmd-autograder-correct/run_autograder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
export PATH="/root/mambaforge/bin:$PATH"
source /root/mambaforge/etc/profile.d/conda.sh
source /root/mambaforge/etc/profile.d/mamba.sh
export PATH="/root/miniforge3/bin:$PATH"
source /root/miniforge3/etc/profile.d/conda.sh
source /root/miniforge3/etc/profile.d/mamba.sh
mamba activate otter-env
python /autograder/source/run_otter.py
8 changes: 4 additions & 4 deletions test/test_assign/files/rmd-autograder-correct/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ dpkg -i /tmp/pandoc.deb

# install mamba
if [ $(uname -p) = "arm" ] || [ $(uname -p) = "aarch64" ] ; \
then wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-aarch64.sh \
then wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh \
-O /autograder/source/mamba_install.sh ; \
else wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh \
else wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh \
-O /autograder/source/mamba_install.sh ; \
fi
chmod +x /autograder/source/mamba_install.sh
/autograder/source/mamba_install.sh -b
echo "export PATH=/root/mambaforge/bin:\$PATH" >> /root/.bashrc
echo "export PATH=/root/miniforge3/bin:\$PATH" >> /root/.bashrc

export PATH=/root/mambaforge/bin:$PATH
export PATH=/root/miniforge3/bin:$PATH
export TAR="/bin/tar"

# install dependencies with mamba
Expand Down
6 changes: 3 additions & 3 deletions test/test_generate/files/autograder-correct/run_autograder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
export PATH="/root/mambaforge/bin:$PATH"
source /root/mambaforge/etc/profile.d/conda.sh
source /root/mambaforge/etc/profile.d/mamba.sh
export PATH="/root/miniforge3/bin:$PATH"
source /root/miniforge3/etc/profile.d/conda.sh
source /root/miniforge3/etc/profile.d/mamba.sh
mamba activate otter-env
python /autograder/source/run_otter.py
8 changes: 4 additions & 4 deletions test/test_generate/files/autograder-correct/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ dpkg -i /tmp/pandoc.deb

# install mamba
if [ $(uname -p) = "arm" ] || [ $(uname -p) = "aarch64" ] ; \
then wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-aarch64.sh \
then wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh \
-O /autograder/source/mamba_install.sh ; \
else wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh \
else wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh \
-O /autograder/source/mamba_install.sh ; \
fi
chmod +x /autograder/source/mamba_install.sh
/autograder/source/mamba_install.sh -b
echo "export PATH=/root/mambaforge/bin:\$PATH" >> /root/.bashrc
echo "export PATH=/root/miniforge3/bin:\$PATH" >> /root/.bashrc

export PATH=/root/mambaforge/bin:$PATH
export PATH=/root/miniforge3/bin:$PATH
export TAR="/bin/tar"

# install dependencies with mamba
Expand Down
6 changes: 3 additions & 3 deletions test/test_generate/files/autograder-custom-env/run_autograder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
export PATH="/root/mambaforge/bin:$PATH"
source /root/mambaforge/etc/profile.d/conda.sh
source /root/mambaforge/etc/profile.d/mamba.sh
export PATH="/root/miniforge3/bin:$PATH"
source /root/miniforge3/etc/profile.d/conda.sh
source /root/miniforge3/etc/profile.d/mamba.sh
mamba activate otter-env
python /autograder/source/run_otter.py
8 changes: 4 additions & 4 deletions test/test_generate/files/autograder-custom-env/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ dpkg -i /tmp/pandoc.deb

# install mamba
if [ $(uname -p) = "arm" ] || [ $(uname -p) = "aarch64" ] ; \
then wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-aarch64.sh \
then wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh \
-O /autograder/source/mamba_install.sh ; \
else wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh \
else wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh \
-O /autograder/source/mamba_install.sh ; \
fi
chmod +x /autograder/source/mamba_install.sh
/autograder/source/mamba_install.sh -b
echo "export PATH=/root/mambaforge/bin:\$PATH" >> /root/.bashrc
echo "export PATH=/root/miniforge3/bin:\$PATH" >> /root/.bashrc

export PATH=/root/mambaforge/bin:$PATH
export PATH=/root/miniforge3/bin:$PATH
export TAR="/bin/tar"

# install dependencies with mamba
Expand Down
6 changes: 3 additions & 3 deletions test/test_generate/files/autograder-r-correct/run_autograder
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
export PATH="/root/mambaforge/bin:$PATH"
source /root/mambaforge/etc/profile.d/conda.sh
source /root/mambaforge/etc/profile.d/mamba.sh
export PATH="/root/miniforge3/bin:$PATH"
source /root/miniforge3/etc/profile.d/conda.sh
source /root/miniforge3/etc/profile.d/mamba.sh
mamba activate otter-env
python /autograder/source/run_otter.py
8 changes: 4 additions & 4 deletions test/test_generate/files/autograder-r-correct/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@ dpkg -i /tmp/pandoc.deb

# install mamba
if [ $(uname -p) = "arm" ] || [ $(uname -p) = "aarch64" ] ; \
then wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-aarch64.sh \
then wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-aarch64.sh \
-O /autograder/source/mamba_install.sh ; \
else wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh \
else wget -nv https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh \
-O /autograder/source/mamba_install.sh ; \
fi
chmod +x /autograder/source/mamba_install.sh
/autograder/source/mamba_install.sh -b
echo "export PATH=/root/mambaforge/bin:\$PATH" >> /root/.bashrc
echo "export PATH=/root/miniforge3/bin:\$PATH" >> /root/.bashrc

export PATH=/root/mambaforge/bin:$PATH
export PATH=/root/miniforge3/bin:$PATH
export TAR="/bin/tar"

# install dependencies with mamba
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash
export PATH="/root/mambaforge/bin:$PATH"
source /root/mambaforge/etc/profile.d/conda.sh
source /root/mambaforge/etc/profile.d/mamba.sh
export PATH="/root/miniforge3/bin:$PATH"
source /root/miniforge3/etc/profile.d/conda.sh
source /root/miniforge3/etc/profile.d/mamba.sh
mamba activate otter-env
python /autograder/source/run_otter.py
Loading

0 comments on commit b751087

Please sign in to comment.