diff --git a/benchmark/Dockerfile b/benchmark/Dockerfile index 5cd765723..09e69f97d 100644 --- a/benchmark/Dockerfile +++ b/benchmark/Dockerfile @@ -1,19 +1,19 @@ FROM buildpack-deps:jammy -# Install Python 3.12 +# Install Python 3.11 RUN apt-get update && apt-get install -y \ software-properties-common \ && add-apt-repository ppa:deadsnakes/ppa \ && apt-get update \ && apt-get install -y \ - python3.12 \ - python3.12-venv \ - python3.12-dev \ + python3.11 \ + python3.11-venv \ + python3.11-dev \ python3-pip \ && rm -rf /var/lib/apt/lists/* -# Make python3.12 the default python3 -RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 1 +# Make python3.11 the default python3 +RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1 # Install Rust RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y diff --git a/benchmark/benchmark.py b/benchmark/benchmark.py index a538f3152..2ba6f16dd 100755 --- a/benchmark/benchmark.py +++ b/benchmark/benchmark.py @@ -659,7 +659,14 @@ def run_test_real( # restore the original file, in case we interrupted a prev run # Find the original file in the language-specific practice dir lang_part = str(testdir).split("/exercises/practice/")[0] - original_fname = Path(lang_part) / "exercises" / "practice" / testdir.name / file_path + original_fname = ( + original_dname + / Path(lang_part) + / "exercises" + / "practice" + / testdir.name + / file_path + ) if original_fname.exists(): os.makedirs(src.parent, exist_ok=True) shutil.copy(original_fname, src)